summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py
diff options
context:
space:
mode:
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.py8
1 files changed, 5 insertions, 3 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 c6226d60eb..675825bd40 100644
--- a/bitbake/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py
+++ b/bitbake/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py
@@ -7,6 +7,7 @@
# SPDX-License-Identifier: GPL-2.0-only
#
+import os
from django.urls import reverse
from django.utils import timezone
@@ -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"]'