# Path: apiwrapper/endpoints/customer_statement.py
# class CustomerStatement(Endpoint):
# 
#     __endpoint_customer_statement = "customer-statement"
#     __endpoint_customer_statement_content = "content"
# 
#     @classmethod
#     def _get_base_endpoint(cls, user_id, account_id, statement_id=None):
#         endpoint = MonetaryAccount._get_base_endpoint(user_id, account_id)
#         endpoint += "/%s" % cls.__endpoint_customer_statement
#         if statement_id is not None:
#             endpoint += "/%d" % statement_id
#         return endpoint
# 
#     def get_all_customer_statements_for_account(self, user_id, account_id):
#         endpoint = self._get_base_endpoint(user_id, account_id)
# 
#         return self._make_get_request(endpoint)
# 
#     def get_customer_statement_by_id(self, user_id, account_id, statement_id):
#         endpoint = self._get_base_endpoint(user_id, account_id, statement_id)
# 
#         return self._make_get_request(endpoint)
# 
#     def get_content_of_customer_statement(self, user_id, account_id,
#                                           statement_id):
#         endpoint = self._get_base_endpoint(user_id, account_id, statement_id)
#         endpoint += "/%s" % self.__endpoint_customer_statement_content
# 
#         return self._make_get_request(endpoint)
# 
# Path: tests/endpoints/test_endpoint.py
# class EndpointTest(TestCase):
#     @staticmethod
#     def create_random_privkey():
#         private_key = rsa.generate_private_key(
#             public_exponent=65537,
#             key_size=2048,
#             backend=default_backend()
#         )
# 
#         return private_key.private_bytes(
#             encoding=serialization.Encoding.PEM,
#             format=serialization.PrivateFormat.PKCS8,
#             encryption_algorithm=serialization.NoEncryption()
#         ).decode()
# 
#     random_privkey = create_random_privkey.__func__()
# 
#     def setUp(self, testing_class):
#         self.api_client = ApiClient(self.random_privkey, str(uuid.uuid4()))
#         self.test_class = testing_class(self.api_client)
#         self.test_class._make_get_request = MagicMock(
#             side_effect=self.side_effect_get)
#         self.test_class._make_post_request = MagicMock(
#             side_effect=self.side_effect_post)
#         self.random_id = random.randint(1, 10000)
#         self.random_uuid = uuid.uuid4()
# 
#     def side_effect_get(self, endpoint):
#         return endpoint
# 
#     def side_effect_post(self, endpoint, payload):
#         return endpoint, payload
# 
#     def assert_parameters(self, should, was):
#         assert (was == should), \
#             "Should be: %s but was: %s" % (should, was)
# 
#     @property
#     def _base_endpoint(self):
#         return None


from apiwrapper.endpoints.customer_statement import CustomerStatement
from tests.endpoints.test_endpoint import EndpointTest


class CustomerStatementTest(EndpointTest):
    __base_endpoint_url = "/user/%d/monetary-account/%d/customer-statement"

    @property
    def _base_endpoint(self):
        return self.__base_endpoint_url % (self.random_id, self.random_id)

    def setUp(self):

# Path: apiwrapper/endpoints/customer_statement.py
# class CustomerStatement(Endpoint):
# 
#     __endpoint_customer_statement = "customer-statement"
#     __endpoint_customer_statement_content = "content"
# 
#     @classmethod
#     def _get_base_endpoint(cls, user_id, account_id, statement_id=None):
#         endpoint = MonetaryAccount._get_base_endpoint(user_id, account_id)
#         endpoint += "/%s" % cls.__endpoint_customer_statement
#         if statement_id is not None:
#             endpoint += "/%d" % statement_id
#         return endpoint
# 
#     def get_all_customer_statements_for_account(self, user_id, account_id):
#         endpoint = self._get_base_endpoint(user_id, account_id)
# 
#         return self._make_get_request(endpoint)
# 
#     def get_customer_statement_by_id(self, user_id, account_id, statement_id):
#         endpoint = self._get_base_endpoint(user_id, account_id, statement_id)
# 
#         return self._make_get_request(endpoint)
# 
#     def get_content_of_customer_statement(self, user_id, account_id,
#                                           statement_id):
#         endpoint = self._get_base_endpoint(user_id, account_id, statement_id)
#         endpoint += "/%s" % self.__endpoint_customer_statement_content
# 
#         return self._make_get_request(endpoint)
# 
# Path: tests/endpoints/test_endpoint.py
# class EndpointTest(TestCase):
#     @staticmethod
#     def create_random_privkey():
#         private_key = rsa.generate_private_key(
#             public_exponent=65537,
#             key_size=2048,
#             backend=default_backend()
#         )
# 
#         return private_key.private_bytes(
#             encoding=serialization.Encoding.PEM,
#             format=serialization.PrivateFormat.PKCS8,
#             encryption_algorithm=serialization.NoEncryption()
#         ).decode()
# 
#     random_privkey = create_random_privkey.__func__()
# 
#     def setUp(self, testing_class):
#         self.api_client = ApiClient(self.random_privkey, str(uuid.uuid4()))
#         self.test_class = testing_class(self.api_client)
#         self.test_class._make_get_request = MagicMock(
#             side_effect=self.side_effect_get)
#         self.test_class._make_post_request = MagicMock(
#             side_effect=self.side_effect_post)
#         self.random_id = random.randint(1, 10000)
#         self.random_uuid = uuid.uuid4()
# 
#     def side_effect_get(self, endpoint):
#         return endpoint
# 
#     def side_effect_post(self, endpoint, payload):
#         return endpoint, payload
# 
#     def assert_parameters(self, should, was):
#         assert (was == should), \
#             "Should be: %s but was: %s" % (should, was)
# 
#     @property
#     def _base_endpoint(self):
#         return None


# Path: tests/endpoints/test_customer_statement.py
from apiwrapper.endpoints.customer_statement import CustomerStatement
from tests.endpoints.test_endpoint import EndpointTest



class CustomerStatementTest(EndpointTest):
    __base_endpoint_url = "/user/%d/monetary-account/%d/customer-statement"

    @property
    def _base_endpoint(self):
        return self.__base_endpoint_url % (self.random_id, self.random_id)

    def setUp(self):

        super().setUp(CustomerStatement)