-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #404 from sparcs-kaist/develop
Fix tests to use appropriate environment variables
- Loading branch information
Showing
5 changed files
with
10 additions
and
15 deletions.
There are no files selected for viewing
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
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
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,13 +1,14 @@ | ||
import pytest | ||
from rest_framework import status | ||
|
||
from tests.conftest import RequestSetting, TestCase | ||
|
||
|
||
@pytest.mark.usefixtures("set_user_client") | ||
class TestHome(TestCase, RequestSetting): | ||
def test_board_perm(self): | ||
r = self.http_request(self.user, "get", "home") | ||
assert r.status_code == 200 | ||
def test_board_permission(self): | ||
res = self.http_request(self.user, "get", "home") | ||
assert res.status_code == status.HTTP_200_OK | ||
|
||
r = self.http_request(None, "get", "home") | ||
assert r.status_code == 401 | ||
res = self.http_request(None, "get", "home") | ||
assert res.status_code == status.HTTP_401_UNAUTHORIZED |