kopia lustrzana https://github.com/ctjacobs/pyqso
Move test.db to the 'res' directory.
rodzic
0cdd59f3ef
commit
93e76b9b84
|
@ -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()
|
||||
|
|
|
@ -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):
|
||||
|
|
Ładowanie…
Reference in New Issue