Slight update to the suggestions etag
This commit is contained in:
@@ -25,7 +25,7 @@ def suggestions_etag(request, pk: int) -> Optional[str]:
|
|||||||
return None
|
return None
|
||||||
_ = pickle.load(f)
|
_ = pickle.load(f)
|
||||||
last_auto_type_hash: bytes = pickle.load(f)
|
last_auto_type_hash: bytes = pickle.load(f)
|
||||||
return str(last_auto_type_hash) + str(settings.NUMBER_OF_SUGGESTED_DATES)
|
return f"{last_auto_type_hash}:{settings.NUMBER_OF_SUGGESTED_DATES}"
|
||||||
|
|
||||||
|
|
||||||
def suggestions_last_modified(request, pk: int) -> Optional[datetime]:
|
def suggestions_last_modified(request, pk: int) -> Optional[datetime]:
|
||||||
|
|||||||
@@ -1336,7 +1336,7 @@ class TestDocumentApi(DirectoriesMixin, DocumentConsumeDelayMixin, APITestCase):
|
|||||||
self.assertIn("ETag", response.headers)
|
self.assertIn("ETag", response.headers)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
response.headers["ETag"],
|
response.headers["ETag"],
|
||||||
f"\"b'thisisachecksum'{settings.NUMBER_OF_SUGGESTED_DATES}\"",
|
f"\"b'thisisachecksum':{settings.NUMBER_OF_SUGGESTED_DATES}\"",
|
||||||
)
|
)
|
||||||
|
|
||||||
mocked_pickle_load.rest_mock()
|
mocked_pickle_load.rest_mock()
|
||||||
|
|||||||
Reference in New Issue
Block a user