示例#1
0
 def test_update_finalized(self):
     annotations = Annotations(merge_method=add,
                               finalized=False,
                               condition=if_existing)
     annotations.update(Annotations(finalized=True))
     assert add == annotations.merge_method
     assert annotations.finalized
     assert if_existing == annotations.condition
示例#2
0
 def test_update_condition(self):
     annotations = Annotations(merge_method=add,
                               finalized=False,
                               condition=if_existing)
     annotations.update(Annotations(condition=always))
     assert add == annotations.merge_method
     assert not annotations.finalized
     assert always == annotations.condition
示例#3
0
 def test_update_merge_method(self):
     annotations = Annotations(merge_method=add,
                               finalized=True,
                               condition=if_existing)
     annotations.update(Annotations(merge_method=overwrite))
     assert overwrite == annotations.merge_method
     assert annotations.finalized
     assert if_existing == annotations.condition