Skip to content

Commit 6360cc5

Browse files
committed
test: use updated object when calling update()
1 parent d326f14 commit 6360cc5

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

extras/live_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ def test_incidents():
293293
component_status=enums.COMPONENT_STATUS_MAJOR_OUTAGE,
294294
)
295295
pprint(issue.attrs)
296-
issue.update()
296+
issue = issue.update()
297297
issue.delete()
298298

299299

tests/test_components.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def test_tags(self):
7676

7777
comp.add_tag('Tag 1')
7878
comp.add_tag('Tag 2')
79-
comp = comp.update()
79+
comp = comp = comp.update()
8080
self.assertTrue(comp.has_tag('Tag 1'))
8181
self.assertTrue(comp.has_tag('Tag 2'))
8282
self.assertTrue(comp.has_tag(slug='tag-1'))
@@ -88,7 +88,7 @@ def test_tags(self):
8888
self.assertEqual(len(comp.tags), 3)
8989
comp.del_tag(slug="tag-1")
9090
self.assertEqual(len(comp.tags), 2)
91-
comp.update()
91+
comp = comp.update()
9292
self.assertFalse(comp.has_tag(slug="tag-1"))
9393
self.assertFalse(comp.has_tag(name="tag 1"))
9494
self.assertTrue(comp.has_tag(slug="tag-2"))

tests/test_incident_updates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def test_create(self):
6464
entry = updates[-1]
6565
entry.status = enums.INCIDENT_INVESTIGATING
6666
entry.message = "Lookin into it.."
67-
entry.update()
67+
entry = entry.update()
6868

6969
# Manually re-fetch
7070
updated_entry = self.client.incident_updates.get(entry.incident_id, entry.id)

0 commit comments

Comments
 (0)