This repository has been archived by the owner on Jul 21, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use standard library HTTPStatus enum
- Loading branch information
Showing
3 changed files
with
8 additions
and
16 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
from flask import url_for | ||
from http import HTTPStatus | ||
|
||
from flask_forecaster.constants import HttpStatus | ||
from flask import url_for | ||
|
||
|
||
def test_route_home(client): | ||
response = client.get(url_for('home')) | ||
assert response.status_code == HttpStatus.OK | ||
assert response.status_code == HTTPStatus.OK | ||
|
||
|
||
def test_route_project(client): | ||
with client.session_transaction() as session: | ||
session['token'] = 'foo' | ||
response = client.get(url_for('project', project_id=123)) | ||
assert response.status_code == HttpStatus.OK | ||
assert response.status_code == HTTPStatus.OK | ||
|
||
|
||
def test_route_project_redirect(client): | ||
response = client.get(url_for('project', project_id=123)) | ||
assert response.status_code == HttpStatus.REDIRECTED | ||
assert response.status_code == HTTPStatus.FOUND |