| Total Complexity | 2 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | from synergine.synergy.collection.Configuration import Configuration |
||
| 6 | class TestCollectionConfiguration(Configuration): |
||
| 7 | |||
| 8 | def get_start_objects(self, collection, context): |
||
| 9 | objs_setup = ( |
||
| 10 | ('john', 2, 2), |
||
| 11 | ('boby', 2, 5), |
||
| 12 | ('cora', 2, 10), |
||
| 13 | ('mara', 2, 20), |
||
| 14 | ) |
||
| 15 | |||
| 16 | objects = [] |
||
| 17 | for obj_setup in objs_setup: |
||
| 18 | obj = TestSynergyObject(collection, context) |
||
| 19 | obj.setUp(obj_setup[0], obj_setup[1], obj_setup[2]) |
||
| 20 | objects.append(obj) |
||
| 21 | context.metas.collections.add(obj.get_id(), COL_COMPUTABLE) |
||
| 22 | context.metas.states.add(obj.get_id(), COMPUTABLE) |
||
| 23 | context.metas.states.add(COMPUTABLE, obj.get_id()) |
||
| 24 | |||
| 25 | return objects |