def create_distributor_with_mocked_api_calls(self):
     distributor = FileDistributor()
     distributor.get_hosting_locations = Mock()
     distributor.get_hosting_locations.return_value = [
         self.target_dir,
     ]
     distributor.post_repo_publish = Mock()
     return distributor
 def test_post_repo_publish_not_broken(self):
     distributor = FileDistributor()
     # ensure that this doesn't raise an error
     distributor.post_repo_publish(None, None)
 def test_get_hosting_locations_not_implemented(self):
     distributor = FileDistributor()
     host_locations = distributor.get_hosting_locations(None, None)
     self.assertEquals(0, len(host_locations))
 def test_validate_config_not_implemented(self):
     distributor = FileDistributor()
     self.assertRaises(NotImplementedError, distributor.validate_config,
                       None, None, None)
Example #5
0
 def test_post_repo_publish_not_broken(self):
     distributor = FileDistributor()
     # ensure that this doesn't raise an error
     distributor.post_repo_publish(None, None)
Example #6
0
 def test_get_hosting_locations_not_implemented(self):
     distributor = FileDistributor()
     host_locations = distributor.get_hosting_locations(None, None)
     self.assertEquals(0, len(host_locations))
Example #7
0
 def create_distributor_with_mocked_api_calls(self):
     distributor = FileDistributor()
     distributor.get_hosting_locations = Mock()
     distributor.get_hosting_locations.return_value = [self.target_dir, ]
     distributor.post_repo_publish = Mock()
     return distributor