-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add cap status to parsed event #2
feat: add cap status to parsed event #2
Conversation
this is needed to drop status=test alerts.
Hi @antonanders, thanks a lot for the PR! I'm attaching a test data file containing one of the test alerts, could you add that to Also - and I realize this is super nitpicky 😅 - this repository uses single quotes for tokens / short strings, could you adjust that? |
Hi @jdemaeyer, thanks for pointing that out! Python is pretty new to me, so I hope, the changes are OK. :) |
No worries at all, I couldn't be more grateful that you're submitting a PR :) I've added two smaller comments in the hope you're not too annoyed yet, but after that we should be good to go! |
@jdemaeyer Thanks! |
tests/test_parsers.py
Outdated
def test_cap_parser(data_dir): | ||
test_cap_parser_actual_status(data_dir) | ||
test_cap_parser_test_status(data_dir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pytest
automatically picks up all functions prefixed with test_
, so we don't need this wrapper function :)
'onset': datetime.datetime(2024, 4, 23, 10, 21, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200))), # noqa | ||
'expires': datetime.datetime(2024, 4, 23, 12, 0, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200))), # noqa | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our old test already covers parsing for all other fields, so probably just assert records[0]['status'] == 'test'
is enough here?
Ah my bad, should be there now :) |
minimal change to make filtering work.
See jdemaeyer/brightsky#166