コード例 #1
0
ファイル: test_dimensions.py プロジェクト: druid-io/pydruid
    def test_list_filtered_spec(self):
        dim_spec = DimensionSpec('dim', 'out').build()
        list_filtered_spec = ListFilteredSpec(['val1', 'val2'])
        actual = list_filtered_spec.build(dim_spec)
        expected_dim_spec = {'type': 'default', 'dimension': 'dim', 'outputName': 'out'}
        expected = {
            'type': 'listFiltered',
            'delegate': expected_dim_spec,
            'values': ['val1', 'val2'],
        }

        assert actual == expected
コード例 #2
0
ファイル: test_dimensions.py プロジェクト: wanaminn/pydruid
    def test_list_filtered_spec(self):
        dim_spec = DimensionSpec("dim", "out").build()
        list_filtered_spec = ListFilteredSpec(["val1", "val2"])
        actual = list_filtered_spec.build(dim_spec)
        expected_dim_spec = {
            "type": "default",
            "dimension": "dim",
            "outputName": "out"
        }
        expected = {
            "type": "listFiltered",
            "delegate": expected_dim_spec,
            "values": ["val1", "val2"],
        }

        assert actual == expected
コード例 #3
0
    def test_list_filtered_spec(self):
        dim_spec = DimensionSpec('dim', 'out').build()
        list_filtered_spec = ListFilteredSpec(['val1', 'val2'])
        actual = list_filtered_spec.build(dim_spec)
        expected_dim_spec = {
            'type': 'default',
            'dimension': 'dim',
            'outputName': 'out'
        }
        expected = {
            'type': 'listFiltered',
            'delegate': expected_dim_spec,
            'values': ['val1', 'val2'],
        }

        assert actual == expected