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
4f0368f0
authored
Jun 09, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix pep8
parent
37704ac9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
circle/dashboard/tests/test_mockedviews.py
+3
-11
No files found.
circle/dashboard/tests/test_mockedviews.py
View file @
4f0368f0
...
...
@@ -59,29 +59,20 @@ class ViewUserTestCase(unittest.TestCase):
self
.
assertEquals
(
view
(
request
,
pk
=
1234
)
.
render
()
.
status_code
,
200
)
class
ExpiredSigner
(
TimestampSigner
):
def
timestamp
(
self
):
return
baseconv
.
base62
.
encode
(
1
)
@classmethod
def
dumps
(
cls
,
obj
,
key
=
None
,
salt
=
'django.core.signing'
,
serializer
=
JSONSerializer
,
compress
=
False
):
def
dumps
(
cls
,
obj
,
key
=
None
,
salt
=
'django.core.signing'
,
serializer
=
JSONSerializer
,
compress
=
False
):
data
=
serializer
()
.
dumps
(
obj
)
base64d
=
b64_encode
(
data
)
return
cls
(
key
,
salt
=
salt
)
.
sign
(
base64d
)
class
SubscribeTestCase
(
unittest
.
TestCase
):
@patch.object
(
UnsubscribeFormView
,
'get_object'
)
def
test_change
(
self
,
go
):
go
.
return_value
=
MagicMock
(
spec
=
Profile
)
UnsubscribeFormView
.
get_token
(
1
)
request
=
FakeRequestFactory
(
POST
=
{
'email_notifications'
:
'on'
})
view
(
request
)
self
.
assertTrue
(
go
.
return_value
.
email_notifications
)
@patch.object
(
views
.
UnsubscribeFormView
,
'get_queryset'
)
@patch.object
(
views
.
UnsubscribeFormView
,
'form_valid'
)
def
test_change
(
self
,
iv
,
gq
):
...
...
@@ -122,6 +113,7 @@ class SubscribeTestCase(unittest.TestCase):
request
=
FakeRequestFactory
(
POST
=
{})
assert
view
(
request
,
token
=
oldtoken
)[
'location'
]
class
VmOperationViewTestCase
(
unittest
.
TestCase
):
def
test_available
(
self
):
...
...
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