예제 #1
0
 def test_generate_orphans_by_type_with_unit_keys_invalid_type(self):
     """
     Assert that when an invalid content type is passed to
     generate_orphans_by_type_with_unit_keys a MissingResource exception is raised.
     """
     self.assertRaises(
         pulp_exceptions.MissingResource,
         OrphanManager.generate_orphans_by_type_with_unit_keys('Not a type').next)
예제 #2
0
 def test_generate_orphans_by_type_with_unit_keys_invalid_type(self):
     """
     Assert that when an invalid content type is passed to
     generate_orphans_by_type_with_unit_keys a MissingResource exception is raised.
     """
     self.assertRaises(
         pulp_exceptions.MissingResource,
         OrphanManager.generate_orphans_by_type_with_unit_keys(
             'Not a type').next)
예제 #3
0
파일: test_orphan.py 프로젝트: pulp/pulp
    def test_generate_orphans_by_type_with_unit_keys_invalid_type(self, mock_get_unit_key_fields):
        """
        Assert that when an invalid content type is passed to
        generate_orphans_by_type_with_unit_keys a MissingResource exception is raised.
        """
        # simulate the type not being found
        mock_get_unit_key_fields.side_effect = ValueError

        self.assertRaises(
            pulp_exceptions.MissingResource,
            OrphanManager.generate_orphans_by_type_with_unit_keys('Not a type').next)
예제 #4
0
    def test_generate_orphans_by_type_with_unit_keys_invalid_type(self, mock_get_unit_key_fields):
        """
        Assert that when an invalid content type is passed to
        generate_orphans_by_type_with_unit_keys a MissingResource exception is raised.
        """
        # simulate the type not being found
        mock_get_unit_key_fields.side_effect = ValueError

        self.assertRaises(
            pulp_exceptions.MissingResource,
            OrphanManager.generate_orphans_by_type_with_unit_keys('Not a type').next)