Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
c90dcd33
Unverified
Commit
c90dcd33
authored
Jan 29, 2017
by
Joost Rijneveld
Browse files
activemembers/board: test if absolute_url reverses
parent
e5e1b135
Changes
2
Hide whitespace changes
Inline
Side-by-side
website/activemembers/fixtures/committees.json
View file @
c90dcd33
...
...
@@ -26,5 +26,24 @@
"photo"
:
"Thom_Wiggers_4YRoxV3.jpg"
,
"permissions"
:
[]
}
},
{
"model"
:
"activemembers.committee"
,
"pk"
:
3
,
"fields"
:
{
"name_nl"
:
"testbestuur1"
,
"name_en"
:
"testboard1"
,
"description_nl"
:
"testdesc1"
,
"description_en"
:
"testdesc1"
,
"since"
:
"1990-09-01"
,
"until"
:
"1991-09-01"
}
},
{
"model"
:
"activemembers.board"
,
"pk"
:
3
,
"fields"
:
{
"is_board"
:
true
}
}
]
website/activemembers/tests.py
View file @
c90dcd33
...
...
@@ -4,7 +4,7 @@ from django.db.utils import IntegrityError
from
django.test
import
TestCase
from
django.utils
import
timezone
from
activemembers.models
import
Committee
,
CommitteeMembership
from
activemembers.models
import
Committee
,
CommitteeMembership
,
Board
from
members.models
import
Member
...
...
@@ -144,3 +144,13 @@ class PermissionsBackendTest(TestCase):
def
test_nonmember_user
(
self
):
u
=
get_user_model
().
objects
.
create
(
username
=
'foo'
)
self
.
assertEqual
(
set
(),
u
.
get_all_permissions
())
class
BoardTest
(
TestCase
):
fixtures
=
[
'committees.json'
]
def
setUp
(
self
):
self
.
testboard
=
Board
.
objects
.
get
(
pk
=
3
)
def
test_get_absolute_url
(
self
):
self
.
testboard
.
get_absolute_url
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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