Skip to content

Conversation

@TurkinDV
Copy link
Owner

@TurkinDV TurkinDV commented Sep 16, 2023

К сожалению, не хватило времени сделать больше

Поэтому основой целью(план минимум) для себя поставил - попробовать поработать с httpretty, так как раньше не сталкивался и не повторять код из лекции(то есть не тестировать регистрацию)

Исключил из покрытия html шаблоны, итоговое покрытие получилось следующим

Name                                                            Stmts   Miss Branch BrPart  Cover   Missing
TOTAL                                                             658     34    141      3    95%

полностью оказались покрыты два файла: server/apps/identity/logic/usecases/user_create_new.py и server/apps/identity/views/user.py

@TurkinDV TurkinDV changed the title add test on usecase user_create_new add test Sep 16, 2023
@TurkinDV TurkinDV changed the title add test add tests Sep 16, 2023


@pytest.fixture()
def settings() -> Settings:
Copy link

Choose a reason for hiding this comment

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

Плагин pytest-django предоставляет фикстуру settings, которая возвращает настройки, поэтому по идее такая фикстура не нужна



@pytest.fixture()
def create_lead_api_user_response() -> UserResponseFactory:
Copy link

Choose a reason for hiding this comment

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

Фикстуру если она просто что-то возвращает лучше назвать без глагола, то есть lead_api_user_response

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