def test_09_associate_distributor(self):
     data = YumDistributor.from_role(self.repo_role).as_data(distributor_id='dist_1')
     response = self.repo.associate_distributor(self.pulp, data=data)
     self.assertPulp(code=201)
     distributor = Distributor.from_response(response)
     # please note although one POSTs 'distributor_id' she gets 'id' in return :-/
     self.assertEqual(data['distributor_id'], distributor.data['id'])
Beispiel #2
0
 def test_09_associate_distributor(self):
     data = YumDistributor.from_role(
         self.repo_role).as_data(distributor_id='dist_1')
     response = self.repo.associate_distributor(self.pulp, data=data)
     self.assertPulp(code=201)
     distributor = Distributor.from_response(response)
     # please note although one POSTs 'distributor_id' she gets 'id' in return :-/
     self.assertEqual(data['distributor_id'], distributor.data['id'])
Beispiel #3
0
 def test_10_associate_distributor_to_unexistant_repo(self):
     data = YumDistributor.from_role(self.repo_role).as_data()
     self.repo2.associate_distributor(self.pulp, data)
     self.assertPulp(code=404)
Beispiel #4
0
 def test_08_associate_distributor_with_invalid_type(self):
     data = YumDistributor.from_role(
         self.repo_role).as_data(distributor_type_id='invalid_distributor')
     self.repo.associate_distributor(self.pulp, data=data)
     self.assertPulp(code=400)
 def test_10_associate_distributor_to_unexistant_repo(self):
     data = YumDistributor.from_role(self.repo_role).as_data()
     self.repo2.associate_distributor(self.pulp, data)
     self.assertPulp(code=404)
 def test_08_associate_distributor_with_invalid_type(self):
     data = YumDistributor.from_role(self.repo_role).as_data(
                         distributor_type_id='invalid_distributor')
     self.repo.associate_distributor(self.pulp, data=data)
     self.assertPulp(code=400)