Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ft insert rows timm #56

Open
wants to merge 5 commits into
base: databases_postgres
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified __pycache__/database.cpython-37.pyc
Binary file not shown.
Binary file modified __pycache__/db_config.cpython-37.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion database.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def select_table(self,query):
def create_table(self, query, database_url):
pass

# @abstractmethod
#@abstractmethod
def insert_rows(self,query):
pass

Expand Down
Binary file modified tests/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file modified tests/integration/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file not shown.
9 changes: 8 additions & 1 deletion tests/integration/test_postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,15 @@ def test_drop_database(self):
self.assertNotEqual(
self.postgres.drop_database(self.database_name),
f"failed to drop database {self.database_name}")


def test_insert_rows(self):
self.assertNotEqual(self.postgres.insert_rows(
self.query, self.table_name, TEST_DATABASE_URL), f"Unable to insert rows")

def test_show_table(self):
self.assertNotEqual(self.postgres.show_table(TEST_DATABASE_URL),
'Failed to show tables')

def tearDown(self):
self.postgres.drop_table(self.table_name, TEST_DATABASE_URL)
self.postgres.drop_database(self.database_name)
Expand Down