def test3(self): target = ProvBundle() target.activity('ex:compose', other_attributes=(('prov:role', "ex:dataToCompose1"), ('prov:role', "ex:dataToCompose2"))) result = ProvBundle() result.activity('ex:compose', other_attributes={'prov:role': "ex:dataToCompose1"}) result_inner = ProvBundle(identifier="ex:bundle1") result_inner.activity('ex:compose', other_attributes=(('prov:role', "ex:dataToCompose1"), ('prov:role', "ex:dataToCompose2"))) result.add_bundle(result_inner) self.assertEqual(result.get_flattened(), target)
def test1(self): target = ProvBundle() target.activity('ex:correct', '2012-03-31T09:21:00', '2012-04-01T15:21:00') result = ProvBundle() result.activity('ex:correct', '2012-03-31T09:21:00') result_inner = ProvBundle(identifier="ex:bundle1") result_inner.activity('ex:correct', None, '2012-04-01T15:21:00') result.add_bundle(result_inner) self.assertEqual(result.get_flattened(), target)