Ejemplo n.º 1
0
 def test_200(self):
     check_all_trees(ignore_errors=True)
     with session.begin():
         session.expire_all()
         # The working tree should not be expired.
         self.assertTrue(any(dla.lab_controller == self.lc
                 for dla in self.distro_tree.lab_controller_assocs))
Ejemplo n.º 2
0
 def test_200(self):
     check_all_trees(ignore_errors=True)
     with session.begin():
         session.expire_all()
         # The working tree should not be expired.
         self.assertTrue(any(dla.lab_controller == self.lc
                 for dla in self.distro_tree.lab_controller_assocs))
Ejemplo n.º 3
0
 def test_404(self):
     with session.begin():
         distro_tree = data_setup.create_distro_tree(
                 lab_controllers=[self.lc],
                 urls=['http://localhost:19998/error/404'])
     check_all_trees(ignore_errors=True)
     with session.begin():
         session.expire_all()
         # The distro tree should be expired.
         self.assertFalse(any(dla.lab_controller == self.lc
                 for dla in distro_tree.lab_controller_assocs))
Ejemplo n.º 4
0
 def test_404(self):
     with session.begin():
         distro_tree = data_setup.create_distro_tree(
                 lab_controllers=[self.lc],
                 urls=['http://localhost:19998/error/404'])
     check_all_trees(ignore_errors=True)
     with session.begin():
         session.expire_all()
         # The distro tree should be expired.
         self.assertFalse(any(dla.lab_controller == self.lc
                 for dla in distro_tree.lab_controller_assocs))
Ejemplo n.º 5
0
 def test_500(self):
     with session.begin():
         lc = self.get_lc()
         distro_tree = data_setup.create_distro_tree(
             lab_controllers=[lc],
             urls=[u'http://localhost:19998/error/500'])
     check_all_trees(ignore_errors=True)
     with session.begin():
         session.expire_all()
         # The distro tree should not be expired.
         self.assertTrue(
             any(dla.lab_controller == self.lc
                 for dla in distro_tree.lab_controller_assocs))