Exemplo n.º 1
0
 def test_with_fqdn(self):
     tstat = Thermostat('tstat.home.mydomain.org')
     url = tstat._construct_url('/fake')
     self.assertEqual(url, 'http://tstat.home.mydomain.org/fake')
Exemplo n.º 2
0
 def test_trailing_slash_preserved(self):
     tstat = Thermostat('192.168.0.2')
     url = tstat._construct_url('/fake/')
     self.assertEqual(url, 'http://192.168.0.2/fake/')
Exemplo n.º 3
0
 def test_with_ip(self):
     tstat = Thermostat('192.168.0.2')
     url = tstat._construct_url('/fake')
     self.assertEqual(url, 'http://192.168.0.2/fake')
Exemplo n.º 4
0
 def test_without_leading_slash(self):
     tstat = Thermostat('192.168.0.2')
     url = tstat._construct_url('fake')
     self.assertEqual(url, 'http://192.168.0.2/fake')
Exemplo n.º 5
0
 def test_with_ip(self):
     tstat = Thermostat('192.168.0.2')
     url = tstat._construct_url('/fake')
     self.assertEqual(url, 'http://192.168.0.2/fake')
Exemplo n.º 6
0
 def test_trailing_slash_preserved(self):
     tstat = Thermostat('192.168.0.2')
     url = tstat._construct_url('/fake/')
     self.assertEqual(url, 'http://192.168.0.2/fake/')
Exemplo n.º 7
0
 def test_without_leading_slash(self):
     tstat = Thermostat('192.168.0.2')
     url = tstat._construct_url('fake')
     self.assertEqual(url, 'http://192.168.0.2/fake')
Exemplo n.º 8
0
 def test_with_fqdn(self):
     tstat = Thermostat('tstat.home.mydomain.org')
     url = tstat._construct_url('/fake')
     self.assertEqual(url, 'http://tstat.home.mydomain.org/fake')