Skip to content

Commit

Permalink
Create better test for not creating a PackageAlerts task.
Browse files Browse the repository at this point in the history
  • Loading branch information
morriscb committed May 29, 2020
1 parent 274e88f commit 0f0b29b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/test_diaPipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ def testRunWithAlerts(self):
def testRunWithoutAlerts(self):
"""Test running without creating and packaging alerts.
"""
with self.assertRaises(AttributeError):
self._testRun(False)
self._testRun(False)

def _testRun(self, doPackageAlerts):
"""Test the normal workflow of each ap_pipe step.
Expand All @@ -132,7 +131,7 @@ def _testRun(self, doPackageAlerts):
if doPackageAlerts:
subtasks.alertPackager.run.assert_called_once()
else:
subtasks.alertPackager.run.assert_not_called()
self.assertFalse(hasattr(subtasks, 'alertPackager'))
self.assertEqual(result.apdb_marker.db_url, "sqlite://")
self.assertEqual(result.apdb_marker.isolation_level,
"READ_UNCOMMITTED")
Expand Down

0 comments on commit 0f0b29b

Please sign in to comment.