GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 47bd99...6fb05a )
by Alex
02:30
created

TestURLs   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 40
rs 10
wmc 10
1
#! ../env/bin/python
2
# -*- coding: utf-8 -*-
3
4
import pytest
5
6
create_user = True
7
8
9
@pytest.mark.usefixtures("testapp")
10
class TestURLs:
11
    def test_home(self, testapp):
12
        """ Tests if the home page loads """
13
14
        rv = testapp.get('/')
15
        assert rv.status_code == 200
16
17
    def test_login(self, testapp):
18
        """ Tests if the login page loads """
19
20
        rv = testapp.get('/login')
21
        assert rv.status_code == 200
22
23
    def test_logout(self, testapp):
24
        """ Tests if the logout page loads """
25
26
        rv = testapp.get('/logout')
27
        assert rv.status_code == 302
28
29
    def test_restricted_logged_out(self, testapp):
30
        """ Tests if the restricted page returns a 302
31
            if the user is logged out
32
        """
33
34
        rv = testapp.get('/restricted')
35
        assert rv.status_code == 302
36
37
    def test_restricted_logged_in(self, testapp):
38
        """ Tests if the restricted page returns a 200
39
            if the user is logged in
40
        """
41
42
        testapp.post('/login', data=dict(
43
            username='admin',
44
            password="supersafepassword"
45
        ), follow_redirects=True)
46
47
        rv = testapp.get('/restricted')
48
        assert rv.status_code == 200
49