Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gwcelery
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sushant Sharma-Chaudhary
gwcelery
Commits
600bf3f2
Commit
600bf3f2
authored
1 year ago
by
Brandon Piotrzkowski
Browse files
Options
Downloads
Patches
Plain Diff
Add missing test coverage when sending manual preliminary alert; fixes #569
parent
a49715c6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gwcelery/tests/test_views.py
+9
-3
9 additions, 3 deletions
gwcelery/tests/test_views.py
with
9 additions
and
3 deletions
gwcelery/tests/test_views.py
+
9
−
3
View file @
600bf3f2
...
...
@@ -58,7 +58,7 @@ def test_send_preliminary_gcn_post(client, monkeypatch):
'
gwcelery.tasks.gracedb.get_superevent.run
'
,
mock_get_superevent
)
monkeypatch
.
setattr
(
'
gwcelery.
views._construct_igwn_alert_and_send
_prelim_alert.run
'
,
'
gwcelery.
tasks.orchestrator.earlywarning
_prelim
inary
_alert.run
'
,
mock_preliminary_alert
)
response
=
client
.
post
(
url_for
(
'
send_preliminary_gcn
'
),
data
=
{
...
...
@@ -71,8 +71,14 @@ def test_send_preliminary_gcn_post(client, monkeypatch):
'
MS190208a
'
,
preferred_event
=
'
M12345
'
)
mock_get_event
.
assert_called_once_with
(
'
M12345
'
)
mock_get_superevent
.
assert_called_once_with
(
'
MS190208a
'
)
mock_preliminary_alert
.
assert_called_once_with
([
mock_superevent
,
mock_event
],
'
MS190208a
'
)
alert
=
{
'
uid
'
:
'
MS190208a
'
,
'
object
'
:
mock_superevent
}
mock_preliminary_alert
.
assert_called_once_with
(
mock_event
,
alert
,
alert_type
=
'
preliminary
'
,
initiate_voevent
=
True
)
def
test_change_preferred_event_post
(
client
,
monkeypatch
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment