Skip to content
Myr

no separate test suite

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 21cd47d · Browse files · 1 file+0 added−66 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+0 added−66 removed

  • other:+0 added−66 removed

1 file+0 added−66 removed

deleted:test_unicode.py-66 removed
1#!/usr/bin/env python2# -*- coding: utf-8 -*-34from __future__ import with_statement56import unittest7import cookielib89try:10 import omnijson as json11except ImportError:12 import json1314import requests15161718HTTPBIN_URL = 'http://httpbin.org/'19HTTPSBIN_URL = 'https://httpbin.ep.io/'2021# HTTPBIN_URL = 'http://staging.httpbin.org/'22# HTTPSBIN_URL = 'https://httpbin-staging.ep.io/'232425def httpbin(*suffix):26 """Returns url for HTTPBIN resource."""2728 return HTTPBIN_URL + '/'.join(suffix)293031def httpsbin(*suffix):32 """Returns url for HTTPSBIN resource."""3334 return HTTPSBIN_URL + '/'.join(suffix)353637SERVICES = (httpbin, httpsbin)38394041class RequestsTestSuite(unittest.TestCase):42 """Requests test cases."""434445 def setUp(self):46 pass474849 def tearDown(self):50 """Teardown."""51 pass525354 def test_HTTP_200_OK_GET_ON_ISO88591(self):55 r = requests.get("http://www.qypedeals.de/Verzehrgutschein+für+Jellyfish")56 self.assertEqual(r.status_code, 200)57 self.assertIsInstance(r.content, unicode)58 59 def test_HTTP_200_OK_GET_ON_BIG5(self):60 r = requests.get("http://google.com.hk/")61 self.assertEqual(r.status_code, 200)62 self.assertIsInstance(r.content, unicode)636465if __name__ == '__main__':66 unittest.main()