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

fix(Home): Tests succeed locally [TDP-202] #982

Merged
merged 1 commit into from
Dec 20, 2022
Merged

Conversation

mmiermans
Copy link
Contributor

@mmiermans mmiermans commented Dec 20, 2022

Goal

Allow tests to be run locally. Tests in test_home_slate_lineup.py failed locally because the DiContainer.init() was not called on startup during tests that use the AsyncClient.

Reference

Background on problem and solution:

Tickets:

Implementation Decisions

  • Going forward I'm trying to move to the pytest style, and away from the unittest style. A pytest fixture could remove the duplicate code used here to instantiate an app with a LifespanManager, as you can see in the above Github issue. Fixtures don't combine with unittest patching, which these tests rely on, and I decided to punt on a larger refactor of these tests.

@mmiermans mmiermans marked this pull request as ready for review December 20, 2022 19:54
@mmiermans mmiermans requested a review from a team as a code owner December 20, 2022 19:54
@mmiermans mmiermans requested review from braunreyes and eu9ene and removed request for braunreyes December 20, 2022 19:54
@mmiermans mmiermans merged commit 54583e5 into main Dec 20, 2022
@mmiermans mmiermans deleted the fix-home-tests branch December 20, 2022 20:44
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.

None yet

2 participants