def test_component_create_from_ref(self): _id = "000000000000000000000001" name = "test_component" component = Component.load( reference=ComponentReference(_id=_id, name=name)) assert component.delete() == True test_component = Component(value=self.json_entries[0]) test_component.save() json = component.json json.pop("version", None) json.pop("metadata", None) assert json == self.json_entries[0]
def test_component_create(self): test_component = Component(name="test_component") print(test_component) test_component.save() assert "_id" in test_component.json