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

[26]tests for models and db #33

Merged
merged 7 commits into from
May 29, 2019

Conversation

stanislawK
Copy link
Contributor

To run tests:

  • get into backend container: docker exec -ti codeforpoznanpl_v3_backend_1 bash
  • type pytest and run

@OtisRed
Copy link
Contributor

OtisRed commented Mar 6, 2019

@stanislawK ping me when conflicts are resolved for testing

@OtisRed OtisRed requested review from jacekkalbarczyk and w1stler May 8, 2019 19:23
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.

Overall looks good, just two minor things.


@pytest.fixture
def _db():
"""Create and configure a new db instance for pytest-flask-sqlalchemy"""
Copy link
Member

Choose a reason for hiding this comment

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

Period at the end.

"""
GIVEN mocked db session, and user data
WHEN a new user added to db
THEN check the user data from db
Copy link
Member

Choose a reason for hiding this comment

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

Gherkin syntax is descriptive and used for the BDD approach. I would stick with classic docstring convention. Though we can discuss this matter.

participant = {'name': 'Jon',
'lastname': 'Doe',
'email': '[email protected]',
'phone': '123456789'}
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.

@w1stler w1stler merged commit dd43c6d into CodeForPoznan:master May 29, 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.

3 participants