Esempio n. 1
0
def test_build_buckets_two_no_buckets():
    assert Query.build_buckets("foo,bar") == {'foo': [''], 'bar': ['']}
Esempio n. 2
0
def test_build_buckets_two_with_buckets_group_by_style():
    # for 'group by', there can be '=' in there.
    assert Query.build_buckets('target_type=,region:us-east|us-west|') == {
        'target_type=': [''],
        'region': ['us-east', 'us-west', '']
    }
Esempio n. 3
0
def test_build_buckets_one_no_buckets():
    assert Query.build_buckets("foo") == {'foo': ['']}
Esempio n. 4
0
def test_build_buckets_two_with_buckets():
    assert Query.build_buckets("n3:bucketmatch1|bucketmatch2,othertag") == {
        'n3': ['bucketmatch1', 'bucketmatch2', ''],
        'othertag': ['']
    }
Esempio n. 5
0
def test_build_buckets_two_no_buckets():
    assert Query.build_buckets("foo,bar") == {'foo': [''], 'bar': ['']}
Esempio n. 6
0
def test_build_buckets_one_no_buckets():
    assert Query.build_buckets("foo") == {'foo': ['']}
Esempio n. 7
0
def test_build_buckets_two_with_buckets_group_by_style():
    # for 'group by', there can be '=' in there.
    assert Query.build_buckets('target_type=,region:us-east|us-west|') == {
        'target_type=': [''],
        'region': ['us-east', 'us-west', '']
    }
Esempio n. 8
0
def test_build_buckets_two_with_buckets():
    assert Query.build_buckets("n3:bucketmatch1|bucketmatch2,othertag") == {
        'n3': ['bucketmatch1', 'bucketmatch2', ''],
        'othertag': ['']
    }