Skip to content

Improvement/add unit tests#353

Open
Tit-Co wants to merge 2 commits intoOpenClassrooms-Student-Center:masterfrom
Tit-Co:improvement/add-unit-tests
Open

Improvement/add unit tests#353
Tit-Co wants to merge 2 commits intoOpenClassrooms-Student-Center:masterfrom
Tit-Co:improvement/add-unit-tests

Conversation

@Tit-Co
Copy link

@Tit-Co Tit-Co commented Mar 11, 2026

Summary

  • Implement some improvements after fixing the first bug in the "Issues" section of the repository.

Improvements

Unit tests

  • Created /unit_tests folder with conftest.py (fixtures) and test_app.py files.
  • Added some unit tests in order to test the differents routes from server.py.
  • Three tests confirmed several bugs listed in the "Issues" section of the repository.

What has been tested ?

Succeed tests

  • Index page status code 200.
  • Index page returns welcome content.
  • Index page authentication status code 200.
  • Index page authentication succeed and returns summary content.
  • Index page authentication fails with unknown mail (status code 404).
  • Summary page logout status code ok (status code 302).
  • Summary page logout succeed and redirects to welcome page.
  • Booking page status code 200.
  • Booking page and returns festival page content.
  • Purchasing places page status code 200.

Failed tests

  • Purchasing places succeed and return summary page content (one assertion failed, confirms one bug in Issues).
  • Purchasing places failed with not enough points (status code should be 403, confirms one bug in Issues).
  • Purchasing places failed with more than 12 places (status code should be 403, confirms one bug in Issues).

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.

1 participant