# Path: lamvery/clients/kms.py
# class KmsClient(BaseClient):
# 
#     def __init__(self, *args, **kwargs):
#         super(KmsClient, self).__init__(*args, **kwargs)
#         self._kms = self._session.client('kms')
# 
#     def encrypt(self, key_id, text):
#         res = self._kms.encrypt(KeyId=key_id, Plaintext=text)
#         return base64.b64encode(res.get('CiphertextBlob'))
# 
#     def decrypt(self, cipher_text):
#         res = self._kms.decrypt(CiphertextBlob=base64.b64decode(cipher_text))
#         return res.get('Plaintext')


import base64
from unittest import TestCase
from nose.tools import eq_
from mock import Mock
from lamvery.clients.kms import KmsClient
# -*- coding: utf-8 -*-




class KmsClientTestCase(TestCase):

    def setUp(self):
        self.client = KmsClient(region='us-east-1')

# Path: lamvery/clients/kms.py
# class KmsClient(BaseClient):
# 
#     def __init__(self, *args, **kwargs):
#         super(KmsClient, self).__init__(*args, **kwargs)
#         self._kms = self._session.client('kms')
# 
#     def encrypt(self, key_id, text):
#         res = self._kms.encrypt(KeyId=key_id, Plaintext=text)
#         return base64.b64encode(res.get('CiphertextBlob'))
# 
#     def decrypt(self, cipher_text):
#         res = self._kms.decrypt(CiphertextBlob=base64.b64decode(cipher_text))
#         return res.get('Plaintext')


# Path: tests/lamvery/clients/kms_test.py
import base64
from unittest import TestCase
from nose.tools import eq_
from mock import Mock
from lamvery.clients.kms import KmsClient

# -*- coding: utf-8 -*-




class KmsClientTestCase(TestCase):

    def setUp(self):
        self.client = KmsClient(region='us-east-1')

        self.client._kms = Mock()