def testConstructURLWithHost(self): options = { 'hostname': 'localhost', } api = BitX('', '', options) url = api.construct_url('test') self.assertEqual(url, 'https://localhost/api/1/test')
def testConstructURLWithPort(self): options = { 'port': 40000 } api = BitX('', '', options) url = api.construct_url('test') self.assertEqual(url, 'https://api.mybitx.com:40000/api/1/test')
def testConstructURL(self): api = BitX('', '') url = api.construct_url('test') self.assertEqual(url, 'https://api.mybitx.com/api/1/test')