diff options
author | Alassane Yattara <alassane.yattara@savoirfairelinux.com> | 2023-10-17 22:58:47 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-10-23 11:39:38 +0100 |
commit | e865f6dc7c7c4f0b447806d525cd69e72c290800 (patch) | |
tree | 990d69a3852571159fa1d305847644d81572b1e7 | |
parent | 99c24df73831a72f311090b3aebcf3cc4e86851a (diff) | |
download | bitbake-contrib-e865f6dc7c7c4f0b447806d525cd69e72c290800.tar.gz |
Toaster: bug-fix on tests/views/test_views.py
- Create a tmp file for base recipe, otherwise test fail it doesn't exist
Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/toaster/tests/views/test_views.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/toaster/tests/views/test_views.py b/lib/toaster/tests/views/test_views.py index f962e7628..06bf6c20a 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() |