예제 #1
0
class ApiProxyTestCase(SmsApiTestCase):
    def setUp(self):

        self.proxy = ApiHttpProxy('https://api.smsapi.pl/')

    def test_invalid_multiple_hosts_connection(self):

        self.proxy.set_hostname(('host1', 'host2', 'host3'))

        self.assertRaises(ApiProxyError, self.proxy.execute, '')

    def test_invalid_host_connection(self):

        self.proxy.set_hostname('host')

        self.assertRaises(ApiProxyError, self.proxy.execute, '')
예제 #2
0
class ApiProxyTestCase(SmsApiTestCase):
    def setUp(self):

        self.proxy = ApiHttpProxy("https://api.smsapi.pl/")

    def test_invalid_multiple_hosts_connection(self):

        self.proxy.set_hostname(("host1", "host2", "host3"))

        self.assertRaises(ApiProxyError, self.proxy.execute, "")

    def test_invalid_host_connection(self):

        self.proxy.set_hostname("host")

        self.assertRaises(ApiProxyError, self.proxy.execute, "")
예제 #3
0
class ApiProxyTestCase(SmsApiTestCase):
    def setUp(self):

        self.proxy = ApiHttpProxy('https://ssl.smsapi.pl/')

    def test_connection(self):
        result = self.proxy.execute()

        self.assertTrue(result.read)
        self.assertTrue(result.getcode)
        self.assertTrue(result.geturl)

    def test_invalid_multiple_hosts_connection(self):

        self.proxy.set_hostname(('host1', 'host2', 'host3'))

        self.assertRaises(ApiProxyError, self.proxy.execute, '')

    def test_invalid_host_connection(self):

        self.proxy.set_hostname('host')

        self.assertRaises(ApiProxyError, self.proxy.execute, '')
예제 #4
0
class ApiProxyTestCase(SmsApiTestCase):

    def setUp(self):
        
        self.proxy = ApiHttpProxy('https://smsapi.com/')

    def test_connection(self):
        result = self.proxy.execute()
        
        self.assertTrue(result.read)
        self.assertTrue(result.getcode)
        self.assertTrue(result.geturl)

    def test_invalid_multiple_hosts_connection(self):

        self.proxy.set_hostname(('host1', 'host2', 'host3'))

        self.assertRaises(ApiProxyError, self.proxy.execute, '')

    def test_invalid_host_connection(self):
    
        self.proxy.set_hostname('host')

        self.assertRaises(ApiProxyError, self.proxy.execute, '')
예제 #5
0
    def setUp(self):

        self.proxy = ApiHttpProxy('https://ssl.smsapi.pl/')
예제 #6
0
 def setUp(self):
     
     self.proxy = ApiHttpProxy('https://smsapi.com/')
예제 #7
0
 def setUp(self):
     
     self.proxy = ApiHttpProxy('https://ssl.smsapi.pl/')
예제 #8
0
    def setUp(self):

        self.proxy = ApiHttpProxy("https://api.smsapi.pl/")