Skip to content

Commit ad5f987

Browse files
author
Sean Sullivan
committed
Update tests
1 parent 09a102d commit ad5f987

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

tests/test_cache.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ def test_du(tmp_path):
2626

2727

2828
def test_tile_name():
29-
assert cache.tile_name("abc", 1, 2, 3, "somehash") == "abc/somehash/3/1/2.png"
29+
assert cache.tile_name("abc", 1, 2, 3, "somehash") == "ba7816bf8f01cfea4141/somehash/3/1/2.png"
3030

3131

3232
def test_tile_id():
33-
assert cache.tile_id("abc", 1, 2, 3, "somehash") == "abc_somehash_3_1_2"
33+
assert cache.tile_id("abc", 1, 2, 3, "somehash") == "ba7816bf8f01cfea4141_somehash_3_1_2"
3434

3535

3636
def test_get_cache_none():
@@ -57,8 +57,8 @@ def test_set_cache(tmp_path):
5757

5858

5959
def test_check_cache_dir(tmp_path):
60-
cache.check_cache_dir(tmp_path, "foo")
61-
assert (tmp_path / "foo").exists()
60+
cache.check_cache_dir(tmp_path, "abc")
61+
assert (tmp_path / "ba7816bf8f01cfea4141").exists()
6262

6363

6464
def test_clear_hash_cache(tmp_path):

tests/test_parameters.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ def test_get_category_field():
118118
assert parameters.get_category_field(None) is None
119119
assert parameters.get_category_field("banana") == "banana"
120120

121-
def test_get_parameter_hash():
122-
assert parameters.get_parameter_hash({"foo": "bar", "baz": 1}) == "a6488297eb1cdaa23e196800b1c399b13d9a5c86cfecaf8f9fd0fbe9af7533db"
123-
assert parameters.get_parameter_hash({"foo": "bar", "baz": 1, "abc": datetime(2022, 2, 17, 11, 0, 0, tzinfo=timezone.utc)}) == "88ade56886a8099e6fd3c25525a0fb9ab3938be64374569480ed3bfd7f3d70e9"
124-
assert parameters.get_parameter_hash({}) == "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
121+
def test_get_parameter_hash():a6488297eb1cdaa23e196800b1c399
122+
assert parameters.get_parameter_hash({"foo": "bar", "baz": 1}) == "a6488297eb1cdaa23e196800b1c399"
123+
assert parameters.get_parameter_hash({"foo": "bar", "baz": 1, "abc": datetime(2022, 2, 17, 11, 0, 0, tzinfo=timezone.utc)}) == "88ade56886a8099e6fd3c25525a0fb"
124+
assert parameters.get_parameter_hash({}) == "e3b0c44298fc1c149afbf4c8996fb9"
125125

126126
def test_get_time_bounds_already_quantized():
127127
now = datetime(2022, 6, 14, 12, 15, 0, tzinfo=timezone.utc)

0 commit comments

Comments
 (0)