Skip to content
Snippets Groups Projects

Add flag and cuid getters to Entity

Merged I. Nüske requested to merge f-fix-linter-errors into dev
1 file
+ 5
3
Compare changes
  • Side-by-side
  • Inline
@@ -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"
Loading