예제 #1
0
파일: indexer_test.py 프로젝트: root-i/h
    def test_it(self, newrelic, log, search_index):
        indexer.sync_annotations("test_queue")

        search_index.sync.assert_called_once_with("test_queue")
        log.info.assert_called_once_with(search_index.sync.return_value)
        newrelic.agent.record_custom_metrics.assert_called_once_with([
            ("Custom/SyncAnnotations/Queue/foo", 2),
            ("Custom/SyncAnnotations/Queue/bar", 3),
        ])
예제 #2
0
    def test_it(self, search_index):
        indexer.sync_annotations("test_queue")

        search_index.sync.assert_called_once_with("test_queue")