- Git clone repo and make branch with firstName_lastName (dmitriy_karasev) (after test is done commit to this branch)
- deploy postgres locally on port 5432
- Create env inviroment and install dependencies from requirements.txt (pip install -r requirement.txt)
- start db.sh (it will create database starwars and create table user)
- To create starwars_test:
- go to alembic -> env.py -> config.set_main_option( "sqlalchemy.url", "postgresql://postgres:postgres@localhost:5432/starwars" ) change to config.set_main_option( "sqlalchemy.url", "postgresql://postgres:postgres@localhost:5432/starwars_test" )
- go to db.sh -> CREATE DATABASE starwars -> change to CREATE DATABASE starwars_test;
- go to alembic -> env.py -> config.set_main_option( "sqlalchemy.url", "postgresql://postgres:postgres@localhost:5432/starwars_test" ) to config.set_main_option( "sqlalchemy.url", "postgresql://postgres:postgres@localhost:5432/starwars" )
- run main.py
- create test for update_user which need to:
0. create test_update.py inside test_api dir
2. Create new user (assert id is not null)
- Update Created user by using update_user route and assert new_name to the name you given while created
-
Notifications
You must be signed in to change notification settings - Fork 1
SamDima/pytest_lesson
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published