Did I find the right examples for you? yes no

All Samples(19)  |  Call(19)  |  Derive(0)  |  Import(0)

src/t/i/TicketTracker-HEAD/web/forms/story.py   TicketTracker(Download)
			fire_task.owner = owner
		else:
			fire_task = models.Task(description='Complete', score=self.cleaned_data['score'], state="TO_WAITING", owner=owner, story=story)
		fire_task.save()
 
 
		if not task_exists:
			task = models.Task()
			task.story = story
			task.description = task_description

src/t/i/TicketTracker-HEAD/storyparser/tests/parser_tests.py   TicketTracker(Download)
	def test_django_story_to_text_existing_tags(self):
		dstory = wm.Story(title = "story_title", story_description = "story_description")
		dtask = wm.Task(description = "task description [#abc]")
		res = converter.Converter.django_story_to_text(dstory, [dtask])	
		self.assertEqual(res, "=story_title\nstory_description\n-task description [#abc]\n")
		dstory.title = "story_title"
 
		dtask = wm.Task(description = "task description")
		res = converter.Converter.django_story_to_text(dstory, [dtask])	
		self.assertEqual(res, "=story_title\nstory_description\n-task description\n")
	def test_django_task_to_text(self):
		dtask = wm.Task(description = "task_description")
		res = converter.Converter.django_task_to_task(dtask).to_text()	
		self.assertEqual(res, "-task_description")
 
	def test_text_to_django_story_with_tasks(self):
		story_text = "= a\nb\n-c"
		dstory = wm.Story(title = " a", story_description = "b")
		dtask = wm.Task(description = "c")
		(rstory, rtasks) = converter.Converter.text_to_django_story(story_text)	
		story_text = "= a\nb\n-c []"
		dstory = wm.Story(title = " a", story_description = "b")
		dtask = wm.Task(description = "c ")
		(rstory, rtasks) = converter.Converter.text_to_django_story(story_text)	
		compare_django_stories(self, rstory, dstory)		

src/t/i/TicketTracker-HEAD/web/views.py   TicketTracker(Download)
 
	for task in story.task_set.all():
		task_new = models.Task()
		task_new.description = task.description
		task_new.score = task.score

src/t/i/TicketTracker-HEAD/storyparser/tests/django_tests.py   TicketTracker(Download)
	def test_username_fail_resolve(self):
		story_text = "= a\nb\n-c [@a]"
		dstory = wm.Story(title = " a", story_description = "b")
		dtask = wm.Task(description = "c  [@a]")
		(rstory, rtasks) = converter.Converter.text_to_django_story(story_text)	
	def test_username_resolve(self):
		u = wm.User.objects.create(username = "andraz")
		story_text = "= a\nb\n-c [@andraz]"
		dstory = wm.Story(title = " a", story_description = "b")
		dtask = wm.Task(description = "c ", owner = u)

src/t/i/TicketTracker-HEAD/storyparser/converter.py   TicketTracker(Download)
		dtasks = []
		for task in story.tasks:
			dtask = wm.Task()
			dtask.score = task.score
			dtask.description = task.text.text