Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ea6124b3
authored
May 28, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: update tests
parent
fcf7744c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
circle/dashboard/tests/test_views.py
+7
-1
No files found.
circle/dashboard/tests/test_views.py
View file @
ea6124b3
...
@@ -1479,6 +1479,8 @@ class GroupDetailTest(LoginMixin, TestCase):
...
@@ -1479,6 +1479,8 @@ class GroupDetailTest(LoginMixin, TestCase):
user_count
=
self
.
g1
.
user_set
.
count
()
user_count
=
self
.
g1
.
user_set
.
count
()
c
=
Client
()
c
=
Client
()
self
.
login
(
c
,
'user1'
)
self
.
login
(
c
,
'user1'
)
self
.
u1
.
user_permissions
.
add
(
Permission
.
objects
.
get
(
name
=
'Can add user'
))
response
=
c
.
post
(
'/dashboard/group/
%
d/create/'
%
self
.
g1
.
pk
,
response
=
c
.
post
(
'/dashboard/group/
%
d/create/'
%
self
.
g1
.
pk
,
{
'username'
:
'userx1'
,
{
'username'
:
'userx1'
,
'password1'
:
'test123'
,
'password1'
:
'test123'
,
...
@@ -1494,7 +1496,10 @@ class GroupDetailTest(LoginMixin, TestCase):
...
@@ -1494,7 +1496,10 @@ class GroupDetailTest(LoginMixin, TestCase):
{
'username'
:
'userx2'
,
{
'username'
:
'userx2'
,
'password1'
:
'test123'
,
'password1'
:
'test123'
,
'password2'
:
'test123'
})
'password2'
:
'test123'
})
self
.
assertEqual
(
response
.
status_code
,
403
)
self
.
assertRedirects
(
response
,
'/accounts/login/?next=/dashboard/group/
%
d/create/'
%
self
.
g1
.
pk
)
self
.
assertEqual
(
response
.
status_code
,
302
)
self
.
assertEqual
(
user_count
,
self
.
g1
.
user_set
.
count
())
self
.
assertEqual
(
user_count
,
self
.
g1
.
user_set
.
count
())
def
test_permitted_user_add
(
self
):
def
test_permitted_user_add
(
self
):
...
@@ -1507,6 +1512,7 @@ class GroupDetailTest(LoginMixin, TestCase):
...
@@ -1507,6 +1512,7 @@ class GroupDetailTest(LoginMixin, TestCase):
{
'username'
:
'userx2'
,
{
'username'
:
'userx2'
,
'password1'
:
'test123'
,
'password1'
:
'test123'
,
'password2'
:
'test123'
})
'password2'
:
'test123'
})
self
.
assertRedirects
(
response
,
'/dashboard/group/
%
d/'
%
self
.
g1
.
pk
)
self
.
assertEqual
(
user_count
+
1
,
self
.
g1
.
user_set
.
count
())
self
.
assertEqual
(
user_count
+
1
,
self
.
g1
.
user_set
.
count
())
self
.
assertEqual
(
response
.
status_code
,
302
)
self
.
assertEqual
(
response
.
status_code
,
302
)
...
...
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