Skip to content

Commit 60b20cf

Browse files
Use constant
1 parent 45bc6b7 commit 60b20cf

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/utils/data/test_simplified_google_storage_client.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import pytest
33
from policyengine.utils.data import SimplifiedGoogleStorageClient
44

5+
VALID_VERSION = "1.2.3"
6+
57

68
class TestSimplifiedGoogleStorageClient:
79
@patch(
@@ -53,12 +55,12 @@ def test_get_latest_version__returns_version_from_metadata(
5355
blob = bucket.get_blob.return_value
5456

5557
# Test case where metadata exists with version
56-
blob.metadata = {"version": "v1.2.3"}
58+
blob.metadata = {"version": VALID_VERSION}
5759

5860
client = SimplifiedGoogleStorageClient()
5961
result = client._get_latest_version("test_bucket", "test_key")
6062

61-
assert result == "v1.2.3"
63+
assert result == VALID_VERSION
6264
mock_instance.get_bucket.assert_called_with("test_bucket")
6365
bucket.get_blob.assert_called_with("test_key")
6466

0 commit comments

Comments
 (0)