def test_create_xmlless_changes(self): labels_amended = [Amendment("DELETE", "200-2-a"), Amendment("MOVE", "200-2-b", "200-2-c")] notice_changes = changes.NoticeChanges() build.create_xmlless_changes(labels_amended, notice_changes) delete = notice_changes.changes["200-2-a"][0] move = notice_changes.changes["200-2-b"][0] self.assertEqual({"action": "DELETE"}, delete) self.assertEqual({"action": "MOVE", "destination": ["200", "2", "c"]}, move)
def test_create_xmlless_changes(self): labels_amended = [Amendment('DELETE', '200-2-a'), Amendment('MOVE', '200-2-b', '200-2-c')] notice_changes = changes.NoticeChanges() build.create_xmlless_changes(labels_amended, notice_changes) delete = notice_changes.changes['200-2-a'][0] move = notice_changes.changes['200-2-b'][0] self.assertEqual({'action': 'DELETE'}, delete) self.assertEqual({'action': 'MOVE', 'destination': ['200', '2', 'c']}, move)