diff options
Diffstat (limited to 'bitbake/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py')
-rw-r--r-- | bitbake/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/bitbake/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py b/bitbake/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py index c560d7de17..675825bd40 100644 --- a/bitbake/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py +++ b/bitbake/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 # # BitBake Toaster Implementation # @@ -7,7 +7,8 @@ # SPDX-License-Identifier: GPL-2.0-only # -from django.core.urlresolvers import reverse +import os +from django.urls import reverse from django.utils import timezone from tests.browser.selenium_helpers import SeleniumTestCase @@ -20,7 +21,8 @@ class TestBuildDashboardPageArtifacts(SeleniumTestCase): """ Tests for artifacts on the build dashboard /build/X """ def setUp(self): - bbv = BitbakeVersion.objects.create(name='bbv1', giturl='/tmp/', + builldir = os.environ.get('BUILDDIR', './') + bbv = BitbakeVersion.objects.create(name='bbv1', giturl=f'{builldir}/', branch='master', dirpath="") release = Release.objects.create(name='release1', bitbake_version=bbv) @@ -197,12 +199,12 @@ class TestBuildDashboardPageArtifacts(SeleniumTestCase): # check package count and size, link on target name selector = '[data-value="target-package-count"]' element = self.find(selector) - self.assertEquals(element.text, '1', + self.assertEqual(element.text, '1', 'package count should be shown for image builds') selector = '[data-value="target-package-size"]' element = self.find(selector) - self.assertEquals(element.text, '1.0 KB', + self.assertEqual(element.text, '1.0 KB', 'package size should be shown for image builds') selector = '[data-link="target-packages"]' |