Skip to content
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

Fix #814: add timestamps to newsletters and waitlists in contact responses #816

Merged
merged 4 commits into from
Oct 3, 2023

Conversation

leplatrem
Copy link
Contributor

I'm not a big fan for those del actual["create_timestamp"] in the tests.

We could either have a omit(dict, keys="") util, or, better IMO, we could have a test util to fuzzy match values instead of actual timestamp values.

For example:

https://github.com/mozilla/normandy/blob/8ec2b525493ee0af7da3e8beee4be4f1669f740c/normandy/base/tests/__init__.py#L12-L51

        assert serializer.data == {
            "signature": Whatever.regex(r"[a-f0-9]{40}"),
            "x5u": Whatever.startswith(signature.x5u),
            "timestamp": Whatever.iso8601(),
            "public_key": Whatever.regex(r"[a-zA-Z0-9/+]{160}"),
        }

https://github.com/mozilla/normandy/blob/8ec2b525493ee0af7da3e8beee4be4f1669f740c/normandy/recipes/tests/api/v1/test_serializers.py#L140-L145

@leplatrem leplatrem requested a review from a team as a code owner September 8, 2023 09:58
@leplatrem leplatrem added the enhancement New feature or request label Sep 8, 2023
@leplatrem leplatrem force-pushed the 814-add-newsletter-fields branch from 8440205 to ce19805 Compare September 8, 2023 10:11
@leplatrem leplatrem force-pushed the 814-add-newsletter-fields branch from ce19805 to 6a97d86 Compare September 8, 2023 10:22
@leplatrem
Copy link
Contributor Author

@grahamalama r?

tests/conftest.py Outdated Show resolved Hide resolved
@leplatrem leplatrem force-pushed the 814-add-newsletter-fields branch from 391590b to 745161b Compare October 3, 2023 12:45
@leplatrem leplatrem merged commit ec34e7c into main Oct 3, 2023
5 checks passed
@leplatrem leplatrem deleted the 814-add-newsletter-fields branch October 3, 2023 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants