#658 [frontend] fixup test fixtures for Rawhide
Merged 7 months ago by msuchy. Opened 7 months ago by praiskup.
copr/ praiskup/copr fixtures-fix  into  master

@@ -277,12 +277,7 @@ 

          self.db.session.add_all([self.b1, self.b2, self.b3, self.b4])

  

      @pytest.fixture

-     def f_hook_package(self):

-         self.f_users()

-         self.f_coprs()

-         self.f_mock_chroots()

-         self.f_builds()

- 

+     def f_hook_package(self, f_users, f_coprs, f_mock_chroots, f_builds):

          self.c1.webhook_secret = str(uuid.uuid4())

          self.db.session.add(self.c1)

          self.pHook = models.Package(

@@ -416,8 +411,7 @@ 

          self.db.session.add_all([self.cp1, self.cp2, self.cp3])

  

      @pytest.fixture

-     def f_actions(self):

-         self.f_db()

+     def f_actions(self, f_db):

          self.delete_action = models.Action(action_type=ActionTypeEnum("delete"),

                                             object_type="copr",

                                             object_id=self.c1.id,

==================================== ERRORS ====================================
ERROR at setup of TestBuildsLogic.test_add_raises_if_copr_has_unfinished_actions
Fixture "f_db" called directly. Fixtures are not meant to be called directly,
but are created automatically when test functions request them as parameters.
See https://docs.pytest.org/en/latest/fixture.html for more information about fixtures, and

rebased onto af4af5f

7 months ago

Pull-Request has been merged by msuchy

7 months ago
Metadata