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

[44] unit tests for contact us endpoint #46

Conversation

stanislawK
Copy link
Contributor

To run tests:

  • get into running container: docker exec -ti codeforpoznanpl_v3_backend_1 bash
  • enter pytest

@OtisRed OtisRed requested review from jacekkalbarczyk and w1stler May 8, 2019 19:22
msg = {"name": "TestName",
"email": "[email protected]",
"phone": "777222333",
"content": "Lorem Ipsum cos tam cos tam"}
Copy link
Member

Choose a reason for hiding this comment

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

I don't like this indentation.

Copy link
Member

@w1stler w1stler left a comment

Choose a reason for hiding this comment

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

Minor stuff

GIVEN an application instance, valid message, and mocked email outbox
WHEN sending valid contact message to send-email endpoint
THEN check status code, message, and email outbox
"""
Copy link
Member

Choose a reason for hiding this comment

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

As in previous PR.

Copy link
Member

@w1stler w1stler left a comment

Choose a reason for hiding this comment

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

Just typo. ;-)



def test_contact_us_endpoint(client, new_msg):
"""Test sending valid message to send-email enndoint."""
Copy link
Member

Choose a reason for hiding this comment

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

endpoint

@OtisRed
Copy link
Contributor

OtisRed commented Jun 5, 2019

@kristhina review, please (make start, make bash, make test)

@kristhina kristhina merged commit 6a367c1 into CodeForPoznan:master Jun 12, 2019
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.

4 participants