Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

tests.py 328 B

14 år sedan
123456789101112
  1. import unittest
  2. import urllib, urllib2, os
  3. class TestREST(unittest.TestCase):
  4. def test_home(self):
  5. req = urllib2.Request('http://localhost/rmehta/wnframework-client/')
  6. req.get_method = lambda: 'GET'
  7. response = urllib2.urlopen(req)
  8. self.assertTrue(response.getcode()==200)
  9. if __name__=='__main__':
  10. unittest.main()