Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jelle van der Waa
Archweb
Commits
d7bac1cf
Commit
d7bac1cf
authored
Jul 29, 2018
by
Jelle van der Waa
🚧
Browse files
Add tests for devel clocks
parent
32e3c6f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
devel/tests/test_devel.py
0 → 100644
View file @
d7bac1cf
from
django.test
import
TransactionTestCase
from
django.contrib.auth.models
import
User
class
DevelView
(
TransactionTestCase
):
fixtures
=
[
'main/fixtures/arches.json'
,
'main/fixtures/repos.json'
,
'main/fixtures/package.json'
]
def
setUp
(
self
):
password
=
'test'
self
.
user
=
User
.
objects
.
create_superuser
(
'admin'
,
'admin@archlinux.org'
,
password
)
self
.
client
.
post
(
'/login/'
,
{
'username'
:
self
.
user
.
username
,
'password'
:
password
})
def
tearDown
(
self
):
self
.
user
.
delete
()
def
test_clock
(
self
):
response
=
self
.
client
.
get
(
'/devel/clock/'
)
self
.
assertEqual
(
response
.
status_code
,
200
)
def
test_profile
(
self
):
response
=
self
.
client
.
get
(
'/devel/profile/'
)
self
.
assertEqual
(
response
.
status_code
,
200
)
# Test changing
def
test_stats
(
self
):
response
=
self
.
client
.
get
(
'/devel/stats/'
)
self
.
assertEqual
(
response
.
status_code
,
200
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment