コード例 #1
0
ファイル: indexer_test.py プロジェクト: gnott/h
    def test_during_reindex_deletes_from_current_index(self, delete, celery, settings_service):
        settings_service.put(SETTING_NEW_INDEX, 'hypothesis-abcdef123')

        indexer.delete_annotation('test-annotation-id')

        delete.assert_any_call(celery.request.es,
                               'test-annotation-id')
コード例 #2
0
    def test_during_reindex_deletes_from_current_index(self, delete, celery, settings_service):
        settings_service.put(SETTING_NEW_INDEX, 'hypothesis-abcdef123')

        indexer.delete_annotation('test-annotation-id')

        delete.assert_any_call(celery.request.es,
                               'test-annotation-id')
コード例 #3
0
    def test_during_reindex_deletes_from_new_index(self, delete, celery,
                                                   settings_service):
        settings_service.put("reindex.new_index", "hypothesis-xyz123")

        indexer.delete_annotation("test-annotation-id")

        delete.assert_any_call(celery.request.es,
                               "test-annotation-id",
                               target_index="hypothesis-xyz123")
コード例 #4
0
ファイル: indexer_test.py プロジェクト: wisdom-garden/h
    def test_during_reindex_deletes_from_new_index(self, delete, celery,
                                                   settings_service):
        settings_service.put('reindex.new_index', 'hypothesis-xyz123')

        indexer.delete_annotation('test-annotation-id')

        delete.assert_any_call(celery.request.es,
                               'test-annotation-id',
                               target_index='hypothesis-xyz123')
コード例 #5
0
ファイル: indexer_test.py プロジェクト: chinmaygghag/h
    def test_during_reindex_deletes_from_current_index(self, delete, celery, settings_service):
        settings_service.put('reindex.new_index', 'hypothesis-abcdef123')
        settings_service.put('reindex.new_es6_index', 'hypothesis-xyz123')

        indexer.delete_annotation('test-annotation-id')

        delete.assert_any_call(celery.request.es,
                               'test-annotation-id',
                               target_index='hypothesis-abcdef123')
        delete.assert_any_call(celery.request.es6, 'test-annotation-id',
                               target_index='hypothesis-xyz123')
コード例 #6
0
ファイル: indexer_test.py プロジェクト: root-i/h
    def test_delete_annotation(self, search_index):
        indexer.delete_annotation(sentinel.annotation_id)

        search_index.delete_annotation_by_id.assert_called_once_with(
            sentinel.annotation_id)
コード例 #7
0
ファイル: indexer_test.py プロジェクト: gnott/h
    def test_it_deletes_from_index(self, delete, celery):
        id_ = 'test-annotation-id'
        indexer.delete_annotation(id_)

        delete.assert_called_once_with(celery.request.es, id_)
コード例 #8
0
    def test_it_deletes_from_index(self, delete, celery):
        id_ = "test-annotation-id"
        indexer.delete_annotation(id_)

        delete.assert_any_call(celery.request.es, id_)
コード例 #9
0
    def test_it_deletes_from_index(self, delete, celery):
        id_ = 'test-annotation-id'
        indexer.delete_annotation(id_)

        delete.assert_called_once_with(celery.request.es, id_)