Skip to content

Commit

Permalink
Remove image string manipulation
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbiggs committed Oct 31, 2024
1 parent 0ca7077 commit 515c561
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions etna/api/tests/test_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,10 @@ def compare_json(self, path: str, json_file: str):
expected_data = self.replace_placeholders(expected_data)

# Remove random image rendition IDs
expected_data = re.sub(r"0_[a-zA-Z0-9]{6,7}", "0", expected_data)
api_data = re.sub(r"0_[a-zA-Z0-9]{6,7}", "0", api_data)
expected_data = re.sub(r"e_[a-zA-Z0-9]{6,7}", "e", expected_data)
api_data = re.sub(r"e_[a-zA-Z0-9]{6,7}", "e", api_data)
expected_data = re.sub(r"e_[a-zA-Z0-9]{6,7}", "_", expected_data)
api_data = re.sub(r"e_[a-zA-Z0-9]{6,7}", "_", api_data)
# expected_data = re.sub(r"0_[a-zA-Z0-9]{6,7}", "0", expected_data)
# api_data = re.sub(r"0_[a-zA-Z0-9]{6,7}", "0", api_data)
# expected_data = re.sub(r"e_[a-zA-Z0-9]{6,7}", "e", expected_data)
# api_data = re.sub(r"e_[a-zA-Z0-9]{6,7}", "e", api_data)

self.assertEqual(expected_data, api_data)

Expand Down

0 comments on commit 515c561

Please sign in to comment.