예제 #1
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'])
예제 #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'])
예제 #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)
예제 #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)
예제 #5
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)
예제 #6
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)