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)
 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)
Esempio n. 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)
Esempio n. 4
0
 def __init__(self):
     super(ListCourseCommand, self).__init__(Course.query_by_creation())
Esempio n. 5
0
 def __init__(self):
     super(ListCourseCommand, self).__init__(Course.query_by_creation())
Esempio n. 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)
Esempio n. 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)