source: uri/tests/UriTest.py@ 231

Last change on this file since 231 was 231, checked in by wouter, 4 years ago

refactoring. Trying to get this working

File size: 826 bytes
Line 
1import unittest
2from ur import URI
3
4class OfferTest (unittest.TestCase) :
5 u1=URI("http://blabla")
6 u1a=URI("http://blabla")
7 u2=URI("ws://localhost:8080/bla/2/3?q=hello#zozo")
8
9 def testGetUri(self):
10 self.assertEqual("ws://localhost:8080/bla/2/3?q=hello#zozo", self.u2.getUri())
11
12 def testRepr(self):
13 self.assertEqual("ws://localhost:8080/bla/2/3?q=hello#zozo", repr(self.u2))
14
15 def testGetHost(self):
16 self.assertEqual("localhost", self.u2.getHost())
17
18 def testGetScheme(self):
19 self.assertEqual("ws", self.u2.getScheme())
20
21 def testGetFragment(self):
22 self.assertEqual("zozo", self.u2.getFragment())
23
24 def testGetQuery(self):
25 self.assertEqual("q=hello", self.u2.getQuery())
Note: See TracBrowser for help on using the repository browser.