Exemplo n.º 1
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
Exemplo n.º 2
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)
Exemplo n.º 3
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))
Exemplo n.º 4
0
 def test_validate_config_not_implemented(self):
     distributor = FileDistributor()
     self.assertRaises(NotImplementedError, distributor.validate_config,
                       None, None, None)
Exemplo n.º 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)
Exemplo n.º 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))
Exemplo n.º 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