def test_should_delete_node_from_elasticsearch_when_deleted(self): node = DeliveryNodeFactory() SyncInfo.objects.create(status=SyncInfo.STATUS.SUCCESSFUL) node.delete() nodes_to_delete = list_nodes_to_delete() self.assertIn(node.id, nodes_to_delete)
def run(): sync = SyncInfo.objects.create() nodes_to_update = serialise_nodes(list_nodes_to_update()) _push_to_elasticsearch(nodes_to_update, list_nodes_to_delete(), sync)