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

[Tests] Messages API tests #261

Merged
merged 1 commit into from
May 10, 2022

Conversation

odesenfans
Copy link
Contributor

Added basic tests for the /api/v0/messages.json endpoint.
Improved the app creation flow: we now create the app inside
the create_app function. This is required to run several
API unit tests, as pytest resets the event loop on each run.

@odesenfans
Copy link
Contributor Author

Depends on #260.

Added basic tests for the /api/v0/messages.json endpoint.
Improved the app creation flow: we now create the app inside
the `create_app` function. This is required to run several
API unit tests, as pytest resets the event loop on each run.
@odesenfans odesenfans marked this pull request as ready for review May 10, 2022 12:42

with fixtures_file.open() as f:
messages = json.load(f)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to validate the messages using aleph-message here ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, I created most of the test data using aleph-client and got the rest from the API.

)

register_routes(app)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too many empty lines to my taste, non-blocking 😉.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How am I gonna increase my stats on Github otherwise?

@odesenfans odesenfans merged commit fc1eb03 into aleph-im:dev May 10, 2022
@odesenfans odesenfans deleted the od-api-tests-messages branch May 10, 2022 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants