def test_generate_filename(self): connector = BaseDBConnector() filename = connector.generate_filename()
def test_init(self): connector = BaseDBConnector()
def test_settings(self): connector = BaseDBConnector() connector.settings
def test_generate_filename(self): connector = BaseDBConnector() self.assertIsNotNone(connector.generate_filename())
def test_settings(self): connector = BaseDBConnector() self.assertFalse(hasattr(connector, '_settings')) self.assertTrue(connector.settings) self.assertTrue(hasattr(connector, '_settings'))
def test_init_with_kwargs(self): connector = BaseDBConnector(FoO='bar') self.assertEqual(connector.foo, 'bar')
def test_init_with_args(self, mocked_connections): connector = BaseDBConnector(database_name='foo') self.assertEqual(connector.database_name, 'foo') self.assertEqual(connector.connection, mocked_connections['foo'])
def test_init(self): connector = BaseDBConnector() self.assertEqual(connector.database_name, DEFAULT_DB_ALIAS) self.assertTrue(connector.connection)