diff mbox series

Toaster: bug-fix on tests.browser.test_most_recent_builds_states

Message ID 20231016134039.135761-1-alassane.yattara@savoirfairelinux.com
State New
Headers show
Series Toaster: bug-fix on tests.browser.test_most_recent_builds_states | expand

Commit Message

Alassane Yattara Oct. 16, 2023, 1:40 p.m. UTC
Fixed errors that make test_most_recent_builds_states failed.
Signed-off-by Alassane Yattara <alassane.yattara@savoirfairelinux.com>
---
 lib/toaster/tests/browser/test_most_recent_builds_states.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/lib/toaster/tests/browser/test_most_recent_builds_states.py b/lib/toaster/tests/browser/test_most_recent_builds_states.py
index a34a0928..949a9476 100644
--- a/lib/toaster/tests/browser/test_most_recent_builds_states.py
+++ b/lib/toaster/tests/browser/test_most_recent_builds_states.py
@@ -54,6 +54,7 @@  class TestMostRecentBuildsStates(SeleniumTestCase):
         build.outcome = Build.IN_PROGRESS
         build.recipes_to_parse = recipes_to_parse
         build.recipes_parsed = 0
+        build.save()
 
         build_request.state = BuildRequest.REQ_INPROGRESS
         build_request.save()
@@ -100,7 +101,7 @@  class TestMostRecentBuildsStates(SeleniumTestCase):
             'Tasks starting', 'build should show "tasks starting" status')
 
         # first task finished; check tasks progress bar
-        task1.order = 1
+        task1.outcome = Task.OUTCOME_SUCCESS
         task1.save()
 
         self.get(url)
@@ -117,7 +118,7 @@  class TestMostRecentBuildsStates(SeleniumTestCase):
         element = Wait(self.driver).until(task_bar_updated, msg)
 
         # last task finished; check tasks progress bar updates
-        task2.order = 2
+        task2.outcome = Task.OUTCOME_SUCCESS
         task2.save()
 
         self.get(url)