#35 [frontend] fix tests for unique mock triplets
Merged 8 years ago by clime. Opened 8 years ago by praiskup.

@@ -183,10 +183,11 @@

      def f_mock_chroots_many(self):

          """

          Adds more chroots to self.c1

+         Requires: f_mock_chroots

          """

          self.mc_list = []

          for arch in ["x86_64", "i386"]:

-             for os_version in range(17, 22):

+             for os_version in range(19, 24):

                  mc = models.MockChroot(

                      os_release="fedora", os_version=os_version,

                      arch=arch, is_active=True)
@@ -310,16 +311,17 @@

              'epel-6-i386': 0,

              'epel-6-x86_64': 3,

              'epel-7-x86_64': 4,

-             'fedora-17-i386': 5,

-             'fedora-17-x86_64': 6,

-             'fedora-18-i386': 2,

-             'fedora-18-x86_64': 3,

-             'fedora-19-i386': 0,

-             'fedora-19-x86_64': 0,

-             'fedora-20-i386': 1,

-             'fedora-20-x86_64': 1,

-             'fedora-21-i386': 1,

-             'fedora-21-x86_64': 4

+             'fedora-18-x86_64': 5,

+             'fedora-19-i386': 5,

+             'fedora-19-x86_64': 6,

+             'fedora-20-i386': 2,

+             'fedora-20-x86_64': 3,

+             'fedora-21-i386': 0,

+             'fedora-21-x86_64': 0,

+             'fedora-22-i386': 1,

+             'fedora-22-x86_64': 1,

+             'fedora-23-i386': 1,

+             'fedora-23-x86_64': 4,

          }

  

          for chroot in self.b_many_chroots.copr.active_chroots:

@@ -47,6 +47,7 @@

  

      def test_collection_ok_by_state(

              self, f_users, f_coprs,

+             f_mock_chroots,

              f_mock_chroots_many,

              f_build_many_chroots,

              f_db,

@@ -615,6 +615,9 @@

  

  class TestCoprRepoGeneration(CoprsTestCase):

  

+     """

+     Requires f_mock_chroots

+     """

      @pytest.fixture

      def f_custom_builds(self):

          """ Custom builds are used in order not to break the default ones """
@@ -626,9 +629,6 @@

          self.b7 = self.models.Build(

              copr=self.c1, user=self.u1, submitted_on=10,

              results="https://bar.baz")

-         self.mc1 = self.models.MockChroot(

-             os_release="fedora", os_version="18", arch="x86_64")

-         self.cc1 = self.models.CoprChroot(mock_chroot=self.mc1, copr=self.c1)

  

          # assign with chroots

          for build in [self.b5, self.b6, self.b7]:
@@ -640,7 +640,7 @@

              )

  

          self.db.session.add_all(

-             [self.b5, self.b6, self.b7, self.mc1, self.cc1])

+             [self.b5, self.b6, self.b7])

  

      @pytest.fixture

      def f_not_finished_builds(self):

Fix 'f_mock_chroots_many' so it really complements
'f_mock_chroots', without clash. Fix some dependency issues
between fixtures.

Complements 4c2a839

rebased

8 years ago

Pull-Request has been merged by clime

8 years ago