예제 #1
0
    def test_get_field_mapping(self):
        """get_field_mapping returns the mapping reported by Elasticsearch."""

        with patch.object(IndicesClient, "get_field_mapping") as gfm:

            gfm.return_value = "pass me through"
            result = DailyIndexDocType.get_field_mapping("field")
            self.assertEqual(result, "pass me through")
예제 #2
0
    def test_get_field_mapping(self):
        """get_field_mapping returns the mapping reported by Elasticsearch."""

        with patch.object(IndicesClient, "get_field_mapping") as gfm:

            gfm.return_value = 'pass me through'
            result = DailyIndexDocType.get_field_mapping('field')
            self.assertEqual(result, 'pass me through')