Skip to content

SamDima/pytest_lesson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to start locally

  1. Git clone repo and make branch with firstName_lastName (dmitriy_karasev) (after test is done commit to this branch)
  2. deploy postgres locally on port 5432
  3. Create env inviroment and install dependencies from requirements.txt (pip install -r requirement.txt)
  4. start db.sh (it will create database starwars and create table user)
  5. To create starwars_test:
    1. 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" )
    2. go to db.sh -> CREATE DATABASE starwars -> change to CREATE DATABASE starwars_test;
    3. 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" )
  6. run main.py
  7. 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)
    1. Update Created user by using update_user route and assert new_name to the name you given while created

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published