Skip to content

Commit

Permalink
ccMixter: Handle bad numbers with a decimal point (#3905)
Browse files Browse the repository at this point in the history
  • Loading branch information
AetherUnbound authored Mar 12, 2024
1 parent db6ab8a commit bcb2af9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion catalog/dags/providers/provider_api_scripts/cc_mixter.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

logger = logging.getLogger(__name__)

JSON_OCTALS = re.compile(r":\s*0+(?P<num>\d+)\s*(?P<sep>[,}])")
JSON_OCTALS = re.compile(r":\s*0+(?P<num>\d+\.?\d*)\s*(?P<sep>[,}])")


class CcMixterDelayedRequester(DelayedRequester):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
ingester = CcMixterDataIngester()


@pytest.mark.parametrize("bad_number", ["0123", "00123"])
@pytest.mark.parametrize("bad_number", ["0123", "00123", "0123.0"])
def test_custom_requester_parses_bad_json(bad_number):
response = Mock(text=f'{{"value": {bad_number}}}')

Expand Down

0 comments on commit bcb2af9

Please sign in to comment.