Skip to content

Commit

Permalink
Merge pull request #102 from openEDI/bufix/unit-tests
Browse files Browse the repository at this point in the history
Fix unit test issues with mock
  • Loading branch information
jgu2 committed Jul 28, 2023
2 parents eb2aadb + 244c09a commit 0fcc76d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/unit/AWS/test_glue.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def test_oedi_glue__get_databasses():

# Test
glue = OEDIGlue()
glue._client = client
response = glue.get_databases()
assert len(response) == 1

Expand Down Expand Up @@ -158,6 +159,7 @@ def test_oedi_glue__get_table():

# Test
glue = OEDIGlue()
glue._client = client
table = glue.get_table(database_name, table_name)
assert table["DatabaseName"] == "test-database"
assert table["Name"] == "test-table"
Expand All @@ -182,6 +184,7 @@ def test_oedi_glue__list_tables():

# Test
glue = OEDIGlue()
glue._client = client
tables = glue.list_tables(database_name)
assert len(tables) == 2
assert "CreateTime" in tables[0]
Expand All @@ -205,6 +208,7 @@ def test_oedi_glue__get_table_columns():

# Test
glue = OEDIGlue()
glue._client = client
columns = glue.get_table_columns(database_name, table_name)
assert len(columns) == 2

Expand All @@ -228,6 +232,7 @@ def test_oedi_glue__get_partition_keys():

# Test
glue = OEDIGlue()
glue._client = client
partition_keys = glue.get_partition_keys(database_name, table_name)
assert len(partition_keys) == 3

Expand All @@ -251,6 +256,7 @@ def test_oedi_glue__get_partition_values():

# Test
glue = OEDIGlue()
glue._client = client
values = glue.get_partition_values(database_name, table_name)
assert len(values) == 0

Expand Down

0 comments on commit 0fcc76d

Please sign in to comment.