def setUp(self): self.user = User.objects.get(username='******') try: install_episode() except FedoraConnectionException: # if for some reason, episode is already in the repo, purge it and # add it again. It needs to be "fresh". purge_episode() install_episode()
def testInstallPurgeEpisodeContentModel(self): # episode is installed in setup, so it should fail to add it again self.assertRaises(FedoraConnectionException, install_episode) purge_episode() # removing it twice should raise the same exception self.assertRaises(FedoraConnectionException, purge_episode) # when not already in the system, install should work install_episode() client = get_client() client.getObject(pp('EPISODE')) # as should get
def handle_noargs(self, *args, **kwargs): try: purge_episode() except Exception, err: print >> sys.stderr, err
def tearDown(self): try: purge_episode() except: pass