Exemplo n.º 1
0
class Test_os(unittest.TestCase):
    def setUp(self):
        self.client = Client(api_key='a', api_secret='b')
        self.optional_data = {'optionalParam': 'value'}

    def test_get_params_set_data_successfully(self):
        self.client.os().get_params(1)
        request = self.client.request
        self.assertEqual(1, request.data['serverId'])

    def test_get_available_os_versions_set_data_successfully(self):
        self.client.os().get_available_os_versions(1)
        request = self.client.request
        self.assertEqual(1, request.data['serverId'])
 def test_os_method_return_os_resource(self):
     client = Client(api_key='a', api_secret='b')
     api_resource = client.os()
     self.assertEqual('OS', api_resource.__class__.__name__)