Example #1
0
 def get(self, url, **kw):
     """ GET with query_string in kw """
     headers = kw.pop('headers', None)
     if kw:
         url = '%s?%s'%(url, urllib.urlencode(kw))
     self.resp = app.get_response(url, headers=headers)
     return self.resp
Example #2
0
 def post(self, url, **kw):
     """ POST with data in kw """
     headers = kw.pop('headers', None)
     self.resp = app.get_response(url, headers=headers, POST=kw)
     return self.resp
Example #3
0
 def test_sign(self):
     ''' Tests create a greeting. It should return a 302 (redirect) status. '''
     response = app.get_response('/sign', POST={'content': 'The content'})
     self.assertEqual(response.status_int, 302)
Example #4
0
 def test_root(self):
     ''' Tests for 200 status code on index. '''
     response = app.get_response('/')
     self.assertEqual(response.status_int, 200)