예제 #1
0
 def test_success(self):
     self.assertIsNone(Course.query().get())
     json_response = rest.new(None, nome='nome_string')
     db_course = Course.query().get()
     self.assertIsNotNone(db_course)
     self.assertEquals('nome_string', db_course.nome)
     self.assert_can_serialize_as_json(json_response)
예제 #2
0
 def test_success(self):
     self.assertIsNone(Course.query().get())
     json_response = rest.new(None, nome='nome_string')
     db_course = Course.query().get()
     self.assertIsNotNone(db_course)
     self.assertEquals('nome_string', db_course.nome)
     self.assert_can_serialize_as_json(json_response)
예제 #3
0
 def test_success(self):
     self.assertIsNone(Course.query().get())
     redirect_response = save(nome='nome_string')
     self.assertIsInstance(redirect_response, RedirectResponse)
     saved_course = Course.query().get()
     self.assertIsNotNone(saved_course)
     self.assertEquals('nome_string', saved_course.nome)
예제 #4
0
 def __init__(self):
     super(ListCourseCommand, self).__init__(Course.query_by_creation())
예제 #5
0
 def __init__(self):
     super(ListCourseCommand, self).__init__(Course.query_by_creation())
예제 #6
0
 def test_sucesso(self):
     resposta = new.save(nome='App Engine')
     self.assertIsInstance(resposta, RedirectResponse)
     curso = Course.query().get()
     self.assertIsNotNone(curso)
     self.assertEqual('App Engine', curso.nome)
예제 #7
0
 def test_sucesso(self):
     resposta = new.save(nome='App Engine')
     self.assertIsInstance(resposta, RedirectResponse)
     curso = Course.query().get()
     self.assertIsNotNone(curso)
     self.assertEqual('App Engine', curso.nome)