Skip to content

Commit

Permalink
Add: Test for traceback view
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Dec 10, 2021
1 parent e1ec9e8 commit 5b63096
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/automations/tests/test_automations.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,22 @@ def test_history_test(self):
self.assertEqual(response.status_code, 200)
self.assertIn("split_again = flow.Split()", response.content.decode("utf8"))

def test_no_traceback_test(self):
atm = TestSplitJoin()
response = self.client.get(
f"/dashboard/{atm._db.id}/traceback/{atm._db.automationtaskmodel_set.first().id}"
)
self.assertEqual(response.status_code, 200)
self.assertIn("No traceback available", response.content.decode("utf8"))

def test_traceback_test(self):
atm = BogusAutomation1()
response = self.client.get(
f"/dashboard/{atm._db.id}/traceback/{atm._db.automationtaskmodel_set.first().id}"
)
self.assertEqual(response.status_code, 200)
self.assertIn("Darn, this is not good", response.content.decode("utf8"))


test_signal = django.dispatch.Signal()

Expand Down

0 comments on commit 5b63096

Please sign in to comment.