* [PATCH 1/2] Toaster: bug-fix on tests/views/test_views.py
@ 2023-10-17 21:58 Alassane Yattara
2023-10-17 21:58 ` [PATCH 2/2] Toaster: bug-fix on tests.views.test_views.py Alassane Yattara
0 siblings, 1 reply; 2+ messages in thread
From: Alassane Yattara @ 2023-10-17 21:58 UTC (permalink / raw)
To: bitbake-devel; +Cc: Alassane Yattara
- Create a tmp file for base recipe, otherwise test fail it doesn't exist
Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
---
lib/toaster/tests/views/test_views.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/toaster/tests/views/test_views.py b/lib/toaster/tests/views/test_views.py
index f962e762..06bf6c20 100644
--- a/lib/toaster/tests/views/test_views.py
+++ b/lib/toaster/tests/views/test_views.py
@@ -41,7 +41,15 @@ class ViewTests(TestCase):
def setUp(self):
self.project = Project.objects.first()
+
self.recipe1 = Recipe.objects.get(pk=2)
+ # create a file and to recipe1 file_path
+ file_path = f"/tmp/{self.recipe1.name.strip().replace(' ', '-')}.bb"
+ with open(file_path, 'w') as f:
+ f.write('foo')
+ self.recipe1.file_path = file_path
+ self.recipe1.save()
+
self.customr = CustomImageRecipe.objects.first()
self.cust_package = CustomImagePackage.objects.first()
self.package = Package.objects.first()
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] Toaster: bug-fix on tests.views.test_views.py
2023-10-17 21:58 [PATCH 1/2] Toaster: bug-fix on tests/views/test_views.py Alassane Yattara
@ 2023-10-17 21:58 ` Alassane Yattara
0 siblings, 0 replies; 2+ messages in thread
From: Alassane Yattara @ 2023-10-17 21:58 UTC (permalink / raw)
To: bitbake-devel; +Cc: Alassane Yattara
- Update toastergui/fixtures/toastergui-unittest-data.xml to added tow distro
objects. Test fail because distro table was empty
Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
---
.../toastergui/fixtures/toastergui-unittest-data.xml | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/lib/toaster/toastergui/fixtures/toastergui-unittest-data.xml b/lib/toaster/toastergui/fixtures/toastergui-unittest-data.xml
index 4517ed17..1d522f88 100644
--- a/lib/toaster/toastergui/fixtures/toastergui-unittest-data.xml
+++ b/lib/toaster/toastergui/fixtures/toastergui-unittest-data.xml
@@ -6,6 +6,18 @@
<field type="CharField" name="dirpath">b</field>
<field type="CharField" name="branch">a</field>
</object>
+ <object pk="1" model="orm.distro">
+ <field type="DateTimeField" name="up_date"><None></None></field>
+ <field to="orm.layer_version" name="layer_version" rel="ManyToOneRel">1</field>
+ <field type="CharField" name="name">poky_distro1</field>
+ <field type="CharField" name="description">poky_distro1 description</field>
+ </object>
+ <object pk="2" model="orm.distro">
+ <field type="DateTimeField" name="up_date"><None></None></field>
+ <field to="orm.layer_version" name="layer_version" rel="ManyToOneRel">2</field>
+ <field type="CharField" name="name">poky_distro2</field>
+ <field type="CharField" name="description">poky_distro2 description</field>
+ </object>
<object pk="1" model="orm.release">
<field type="CharField" name="name">master</field>
<field type="CharField" name="description">master project</field>
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-17 21:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-17 21:58 [PATCH 1/2] Toaster: bug-fix on tests/views/test_views.py Alassane Yattara
2023-10-17 21:58 ` [PATCH 2/2] Toaster: bug-fix on tests.views.test_views.py Alassane Yattara
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.