Ejemplo n.º 1
0
    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)
Ejemplo n.º 2
0
    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)
Ejemplo n.º 3
0
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)