-
Notifications
You must be signed in to change notification settings - Fork 45
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
[26]tests for models and db #33
Conversation
@stanislawK ping me when conflicts are resolved for testing |
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.
Overall looks good, just two minor things.
backend/tests/conftest.py
Outdated
|
||
@pytest.fixture | ||
def _db(): | ||
"""Create and configure a new db instance for pytest-flask-sqlalchemy""" |
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.
Period at the end.
backend/tests/test_db.py
Outdated
""" | ||
GIVEN mocked db session, and user data | ||
WHEN a new user added to db | ||
THEN check the user data from db |
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.
Gherkin syntax is descriptive and used for the BDD approach. I would stick with classic docstring convention. Though we can discuss this matter.
backend/tests/conftest.py
Outdated
participant = {'name': 'Jon', | ||
'lastname': 'Doe', | ||
'email': '[email protected]', | ||
'phone': '123456789'} |
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.
I don't like this indentation.
To run tests: