diff --git a/unittests/test_container.py b/unittests/test_container.py index 4ef85910fcd2f5328b5208122a8683d4ce3b1ed6..715a6eb8f409c489413120ca72857808029d323a 100644 --- a/unittests/test_container.py +++ b/unittests/test_container.py @@ -70,7 +70,8 @@ def test_get_property_values(): ) assert len(table) == 2 house_row = table[0] - assert house_row == (house.name, 40.2, "ft", window.id, None, None, None, 20.5, 20.5, "m", owner.name) + assert house_row == (house.name, 40.2, "ft", window.id, None, None, None, 20.5, 20.5, "m", + owner.name) owner_row = table[1] assert owner_row == (owner.name, None, None, None, None, None, None, None, None, None, None) @@ -200,11 +201,12 @@ def test_container_slicing(): with pytest.raises(TypeError): cont[[0, 2, 3]] + def test_container_filter(): # this is a very rudimentary test since filter is based on _filter_entity_list which is tested # separately cont = db.Container() cont.extend([db.Record(name=f"TestRec{ii+1}") for ii in range(5)]) recs = cont.filter(name="TestRec2") - assert len(recs)==1 - recs[0].name =="TestRec2" + assert len(recs) == 1 + recs[0].name == "TestRec2"