def test_create_trust(self): make_story( user=get_user_staff(), area=get_area_hatherleigh(), title='10 Pub Barrel Pull Success', description='10 Pub Pull on Saturday', )
def test_create_no_user_or_name(self): self.assertRaises( ValueError, make_story, area=get_area_hatherleigh(), title='Alpha Male', description='completed their 300 mile paddle', )
def test_create_anon(self): make_story( name='Pat', email='*****@*****.**', area=get_area_hatherleigh(), title='Alpha Male', description='completed their 300 mile paddle', )
def test_create_anon_post(self): url = reverse('story.create.anon') data = dict( name='Patrick', email='*****@*****.**', area=get_area_hatherleigh().pk, title='Chilli Night', description='Hot, hot, hot...', captcha_0='testing', captcha_1='PASSED', ) response = self.client.post(url, data) self.assertEqual(response.status_code, 302) Story.objects.get(name='Patrick')