Skip to content

Commit

Permalink
Fix e2e tests for filtering columns (#994)
Browse files Browse the repository at this point in the history
  • Loading branch information
shnela authored Sep 7, 2022
1 parent 0804dd4 commit 6a74572
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions e2e_tests/standard/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def _test_fetch_from_container(self, init_container, get_containers_as_rows):
assert container1.get_attribute_value(key2) == value2
assert container2.get_attribute_value(key1) == value1
with pytest.raises(ValueError):
assert container2.get_attribute_value(key2)
container2.get_attribute_value(key2)

def get_container1(**kwargs):
containers_as_rows = get_containers_as_rows(**kwargs)
Expand All @@ -269,15 +269,19 @@ def get_container1(**kwargs):
assert columns_none.get_attribute_value(key2) == value2

columns_empty = get_container1(columns=[])
assert columns_empty.get_attribute_value(key1) is None
assert columns_empty.get_attribute_value(key2) is None
with pytest.raises(ValueError):
columns_empty.get_attribute_value(key1)
with pytest.raises(ValueError):
columns_empty.get_attribute_value(key2)

columns_with_one_key = get_container1(columns=[key1])
assert columns_with_one_key.get_attribute_value(key1) == value1
assert columns_with_one_key.get_attribute_value(key2) is None
with pytest.raises(ValueError):
columns_with_one_key.get_attribute_value(key2)

columns_with_one_key = get_container1(columns=[key2])
assert columns_with_one_key.get_attribute_value(key1) is None
with pytest.raises(ValueError):
columns_with_one_key.get_attribute_value(key1)
assert columns_with_one_key.get_attribute_value(key2) == value2

def test_fetch_runs_table(self, environment):
Expand Down

0 comments on commit 6a74572

Please sign in to comment.