예제 #1
0
    def test_get(self):
        main.Greeting(
            parent=main.guestbook_key('default_guestbook'),
            author='123',
            content='abc'
        ).put()

        response = self.app.get('/')

        # Let's check if the response is correct.
        self.assertEqual(response.status_int, 200)
예제 #2
0
    def test_img(self):
        greeting = main.Greeting(
            parent=main.guestbook_key('default_guestbook'),
            id=123
        )
        greeting.author = 'asdf'
        greeting.content = 'asdf'
        greeting.avatar = b'123'
        greeting.put()

        response = self.app.get('/img?img_id=%s' % greeting.key.urlsafe())

        self.assertEqual(response.status_int, 200)
예제 #3
0
    def test_img(self):
        greeting = main.Greeting(
            parent=main.guestbook_key('default_guestbook'),
            id=123,
        )
        greeting.author = 'asdf'
        greeting.content = 'asdf'
        greeting.put()

        request = webapp2.Request.blank('/img?img_id=%s' %
                                        greeting.key.urlsafe())
        response = request.get_response(main.app)

        self.assertEqual(response.status_int, 200)
    def test_img(self):
        greeting = main.Greeting(
            parent=main.guestbook_key('default_guestbook'),
            id=123,
        )
        greeting.author = 'asdf'
        greeting.content = 'asdf'
        greeting.put()

        request = webapp2.Request.blank(
            '/img?img_id=%s' % greeting.key.urlsafe()
        )
        response = request.get_response(main.app)

        self.assertEqual(response.status_int, 200)