Skip to content

Commit

Permalink
Add tests for database name and uri
Browse files Browse the repository at this point in the history
  • Loading branch information
gunthercox committed Jul 21, 2017
1 parent 4c690ac commit 95efe1b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/storage_adapter_tests/test_sqlalchemy_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ def tearDown(self):

class SQLStorageAdapterTestCase(SQLAlchemyAdapterTestCase):

def test_set_database_name_none(self):
adapter = SQLStorageAdapter(database=None)
self.assertEqual(adapter.database_uri, 'sqlite://')

def test_set_database_name(self):
adapter = SQLStorageAdapter(database='test')
self.assertEqual(adapter.database_uri, 'sqlite:///test.db')

def test_set_database_uri(self):
adapter = SQLStorageAdapter(database_uri='sqlite:///db.sqlite3')
self.assertEqual(adapter.database_uri, 'sqlite:///db.sqlite3')

def test_count_returns_zero(self):
"""
The count method should return a value of 0
Expand Down

0 comments on commit 95efe1b

Please sign in to comment.