def test_deployment_crud(self): a = ApplicationFactory() r = self.c.get(a.get_absolute_url()) self.assertFalse("test deployment" in r.content) r = self.c.post(a.get_absolute_url() + "add_deployment/", {'name': 'test deployment'}) self.assertEqual(r.status_code, 302) r = self.c.get(a.get_absolute_url()) self.assertTrue("test deployment" in r.content)
def test_deployment_crud(self): a = ApplicationFactory() r = self.c.get(a.get_absolute_url()) self.assertFalse("test deployment" in r.content) r = self.c.post(a.get_absolute_url() + "add_deployment/", {'name': 'test deployment'}) self.assertEqual(r.status_code, 302) r = self.c.get(a.get_absolute_url()) self.assertTrue("test deployment" in r.content)
def test_active_deployments(self): a = ApplicationFactory() self.assertEquals(a.active_deployments().count(), 0)
def test_basics(self): a = ApplicationFactory() self.assertEquals(unicode(a), "test application") self.assertEquals(a.get_absolute_url(), "/application/%d/" % a.id)