Пример #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 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)
Пример #5
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)