Newer
Older
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from unittest import TestCase
from pod_client.PodClient import PodClient
from pod_client.Resource import Resource, API_URLS
HOST = 'http://pod.ubicast.net'
def setUpModule():
pass
def tearDownModule():
pass
class PodClientTest(TestCase):
def test_init(self):
pod_client = PodClient(HOST)
for key in API_URLS.keys():
self.assertTrue(hasattr(pod_client, key))
self.assertTrue(isinstance(getattr(pod_client, key), Resource))
success = True
try:
pod_client = PodClient('')
except Exception:
success = False
self.assertFalse(success)