Move test.db to the 'res' directory.

pull/61/head
Christian T. Jacobs 2017-04-05 23:18:23 +01:00
rodzic 0cdd59f3ef
commit 93e76b9b84
3 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -675,7 +675,8 @@ class TestADIF(unittest.TestCase):
""" Check that records can be written to an ADIF file from a test database file. """
import sqlite3
import os.path
self.connection = sqlite3.connect(os.path.dirname(os.path.realpath(__file__))+"/unittest_resources/test.db")
path_to_test_database = os.path.join(os.path.realpath(os.path.dirname(__file__)), os.pardir, "res/test.db")
self.connection = sqlite3.connect(path_to_test_database)
self.connection.row_factory = sqlite3.Row
c = self.connection.cursor()

Wyświetl plik

@ -1336,7 +1336,8 @@ class TestLogbook(unittest.TestCase):
def setUp(self):
""" Set up the Logbook object and connection to the test database needed for the unit tests. """
self.logbook = Logbook(application=mock.MagicMock())
success = self.logbook.db_connect(os.path.dirname(os.path.realpath(__file__))+"/unittest_resources/test.db")
path_to_test_database = os.path.join(os.path.realpath(os.path.dirname(__file__)), os.pardir, "res/test.db")
success = self.logbook.db_connect(path_to_test_database)
assert success
def tearDown(self):