Fixed travis errors
parent
93ea968fb6
commit
cc4f64c115
|
@ -151,5 +151,5 @@ class IssueCommentEventHook(BaseEventHook):
|
||||||
uss = UserStory.objects.filter(external_reference=["github", github_reference])
|
uss = UserStory.objects.filter(external_reference=["github", github_reference])
|
||||||
|
|
||||||
for item in list(issues) + list(tasks) + list(uss):
|
for item in list(issues) + list(tasks) + list(uss):
|
||||||
snapshot = take_snapshot(item, comment="From Github:\n\n {}".format(comment_message), user=get_github_user(github_user))
|
snapshot = take_snapshot(item, comment="From Github:\n\n{}".format(comment_message), user=get_github_user(github_user))
|
||||||
send_notifications(item, history=snapshot)
|
send_notifications(item, history=snapshot)
|
||||||
|
|
|
@ -223,6 +223,9 @@ def test_issues_event_opened_issue(client):
|
||||||
},
|
},
|
||||||
"assignee": {},
|
"assignee": {},
|
||||||
"label": {},
|
"label": {},
|
||||||
|
"repository": {
|
||||||
|
"html_url": "test",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
mail.outbox = []
|
mail.outbox = []
|
||||||
|
@ -303,6 +306,9 @@ def test_issue_comment_event_on_existing_issue_task_and_us(client):
|
||||||
"comment": {
|
"comment": {
|
||||||
"body": "Test body",
|
"body": "Test body",
|
||||||
},
|
},
|
||||||
|
"repository": {
|
||||||
|
"html_url": "test",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
mail.outbox = []
|
mail.outbox = []
|
||||||
|
@ -316,15 +322,15 @@ def test_issue_comment_event_on_existing_issue_task_and_us(client):
|
||||||
|
|
||||||
issue_history = get_history_queryset_by_model_instance(issue)
|
issue_history = get_history_queryset_by_model_instance(issue)
|
||||||
assert issue_history.count() == 1
|
assert issue_history.count() == 1
|
||||||
assert issue_history[0].comment == "From Github: Test body"
|
assert issue_history[0].comment == "From Github:\n\nTest body"
|
||||||
|
|
||||||
task_history = get_history_queryset_by_model_instance(task)
|
task_history = get_history_queryset_by_model_instance(task)
|
||||||
assert task_history.count() == 1
|
assert task_history.count() == 1
|
||||||
assert task_history[0].comment == "From Github: Test body"
|
assert task_history[0].comment == "From Github:\n\nTest body"
|
||||||
|
|
||||||
us_history = get_history_queryset_by_model_instance(us)
|
us_history = get_history_queryset_by_model_instance(us)
|
||||||
assert us_history.count() == 1
|
assert us_history.count() == 1
|
||||||
assert us_history[0].comment == "From Github: Test body"
|
assert us_history[0].comment == "From Github:\n\nTest body"
|
||||||
|
|
||||||
assert len(mail.outbox) == 3
|
assert len(mail.outbox) == 3
|
||||||
|
|
||||||
|
@ -345,6 +351,9 @@ def test_issue_comment_event_on_not_existing_issue_task_and_us(client):
|
||||||
"comment": {
|
"comment": {
|
||||||
"body": "Test body",
|
"body": "Test body",
|
||||||
},
|
},
|
||||||
|
"repository": {
|
||||||
|
"html_url": "test",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
mail.outbox = []
|
mail.outbox = []
|
||||||
|
@ -371,6 +380,9 @@ def test_issues_event_bad_comment(client):
|
||||||
"action": "other",
|
"action": "other",
|
||||||
"issue": {},
|
"issue": {},
|
||||||
"comment": {},
|
"comment": {},
|
||||||
|
"repository": {
|
||||||
|
"html_url": "test",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
ev_hook = event_hooks.IssueCommentEventHook(issue.project, payload)
|
ev_hook = event_hooks.IssueCommentEventHook(issue.project, payload)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue