Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a02a149f
authored
Jun 09, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix test_periodic_task again
parent
b20ebb00
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
circle/dashboard/tests/test_periodic_task.py
+5
-1
No files found.
circle/dashboard/tests/test_periodic_task.py
View file @
a02a149f
...
@@ -10,9 +10,13 @@ from ..tasks import local_periodic_tasks
...
@@ -10,9 +10,13 @@ from ..tasks import local_periodic_tasks
@patch.object
(
local_periodic_tasks
,
'send_mail'
)
@patch.object
(
local_periodic_tasks
,
'send_mail'
)
@patch.object
(
Notification
,
'objects'
)
@patch.object
(
Notification
,
'objects'
)
class
EmailNotificationTestCase
(
unittest
.
TestCase
):
class
EmailNotificationTestCase
(
unittest
.
TestCase
):
nextpk
=
0
def
get_fake_notification
(
self
,
user
=
None
,
**
kwargs
):
def
get_fake_notification
(
self
,
user
=
None
,
**
kwargs
):
self
.
nextpk
+=
1
if
user
is
None
:
if
user
is
None
:
user
=
MagicMock
(
spec
=
User
)
user
=
MagicMock
(
spec
=
User
,
pk
=
self
.
nextpk
)
user
.
profile
.
__unicode__
.
return_value
=
"user"
user
.
profile
.
__unicode__
.
return_value
=
"user"
user
.
email
=
"mail"
user
.
email
=
"mail"
user
.
profile
.
email_notifications
=
True
user
.
profile
.
email_notifications
=
True
...
...
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