def test_create_new_mapStory(self): user = User.objects.create_user(username='******', email='*****@*****.**', password='******') mapstory = MapStory() self.assertIsInstance(mapstory, MapStory) mapstory.title = "Test story" mapstory.owner = user mapstory.save()
def test_create_new_mapStory(self): user = User.objects.create_user(username='******', email='*****@*****.**', password='******') """ Can compose a story * New story form: - Title (text)(required) - Summary (text) - Category (dropdown) 'Health' - Tags (text) - Location (dropdown) 'Africa' """ # Should create an instance of mapstory mapstory = MapStory() self.assertIsInstance(mapstory, MapStory) mapstory.title = "Test story" mapstory.owner = user mapstory.save()
def test_save_story_draft(self): """ Can save draft story """ user = User.objects.create_user(username='******', email='*****@*****.**', password='******') mapstory = MapStory() self.assertIsInstance(mapstory, MapStory) mapstory.title = "Test story" mapstory.owner = user mapstory.save() testMap = Map() testMap.story = mapstory testMap.zoom = 3 testMap.projection = "EPSG:900913" testMap.center_x = -7377090.47385893 testMap.center_y = 3463514.6256579063 testMap.owner = user testMap.save()