diff --git a/tests/db/sync/test_linux.py b/tests/db/sync/test_linux.py index a89b90ab38a9bde75e2af2b232311586de626ecb..53350746b02960ad75b5b8102e28b44f7845063d 100644 --- a/tests/db/sync/test_linux.py +++ b/tests/db/sync/test_linux.py @@ -8,10 +8,11 @@ from rattail.db.sync import linux class SyncDaemonTests(TestCase): @patch.multiple('rattail.db.sync.linux', - db=DEFAULT, + edbob=DEFAULT, + get_default_engine=DEFAULT, get_sync_engines=DEFAULT, synchronize_changes=DEFAULT) - def test_run(self, db, get_sync_engines, synchronize_changes): + def test_run(self, edbob, get_default_engine, get_sync_engines, synchronize_changes): daemon = linux.SyncDaemon('/tmp/rattail_dbsync.pid') @@ -19,12 +20,14 @@ class SyncDaemonTests(TestCase): get_sync_engines.return_value = None daemon.run() get_sync_engines.assert_called_once_with() + self.assertFalse(get_default_engine.called) self.assertFalse(synchronize_changes.called) # with remote engines configured get_sync_engines.return_value = 'fake_remotes' + get_default_engine.return_value = 'fake_local' daemon.run() - synchronize_changes.assert_called_once_with(db.engine, 'fake_remotes') + synchronize_changes.assert_called_once_with('fake_local', 'fake_remotes') class ModuleTests(TestCase):