source: flexoentity/tests/test_collection.py@ 376e21b

Last change on this file since 376e21b was 376e21b, checked in by Enrico Schwass <ennoausberlin@…>, 8 weeks ago

add FlexoCollection

  • Property mode set to 100644
File size: 382 bytes
Line 
1from flexoentity import FlexoCollection, Domain
2
3
4def test_collection_basic():
5 c = FlexoCollection()
6 assert len(c) == 0
7
8 e1 = Domain.with_domain_id("WIP_TEST")
9 e2 = Domain.with_domain_id("TEST_WIP")
10
11 c.add(e1)
12 c.add(e2)
13
14 assert len(c) == 2
15 assert e1.flexo_id in c
16 assert c.get(e1.flexo_id) is e1
17
18 c.remove(e1.flexo_id)
19 assert len(c) == 1
Note: See TracBrowser for help on using the repository browser.