Пример #1
0
 def test_05_get_single_unit_1064934(self):
     #FIXME this will fail, see bz#1064934
     #retrieve unit's id
     unit_result = PuppetModuleUnit.search(
         self.pulp,
         data={
             "criteria": {
                 "filters": {
                     'name': 'jenkins'
                 },
                 "fields": ["name", "_content_type_id"]
             }
         })
     unit = PuppetModuleUnit.get(self.pulp, unit_result[0].id)
     # search by unit by unit_id
     unit_result1 = PuppetModuleUnit.search(
         self.pulp,
         data={
             "criteria": {
                 "filters": {
                     '_id': unit_result[0].id
                 },
                 "fields": ["name", "_content_type_id"]
             }
         })
     # assert that resuls are the same
     self.assertEqual(unit_result, unit_result1)
Пример #2
0
 def test_05_get_single_unit(self):
     #FIXME this will fail, see bz#1064934
     #retrieve unit's id
     unit_result = PuppetModuleUnit.search(self.pulp, data={"criteria": {"filters": {'name': 'jenkins'}, "fields": ["name", "_content_type_id"]}})
     unit = PuppetModuleUnit.get(self.pulp, unit_result[0].id)
     # search by unit by unit_id
     unit_result1 = PuppetModuleUnit.search(self.pulp, data={"criteria": {"filters": {'_id': unit_result[0].id}, "fields": ["name", "_content_type_id"]}})
     # assert that resuls are the same
     self.assertEqual(unit_result, unit_result1)
 def test_01_search_puppet_units(self):
     unit = PuppetModuleUnit.search(
         self.pulp, data={"criteria": {"filters": {}, "fields": ["name", "_content_type_id"]}}
     )
     # check that jenkins puppet module is present in search result
     self.assertIn(
         PuppetModuleUnit(
             data={"name": "jenkins", "_content_type_id": "puppet_module"},
             required_data_keys=["name"],
             relevant_data_keys=["name"],
         ),
         unit,
     )
Пример #4
0
 def test_01_search_puppet_units(self):
     unit = PuppetModuleUnit.search(self.pulp,
                                    data={
                                        "criteria": {
                                            "filters": {},
                                            "fields":
                                            ["name", "_content_type_id"]
                                        }
                                    })
     # check that jenkins puppet module is present in search result
     self.assertIn(
         PuppetModuleUnit(data={
             "name": "jenkins",
             '_content_type_id': 'puppet_module'
         },
                          required_data_keys=['name'],
                          relevant_data_keys=["name"]), unit)