# Path: mangopay/utils.py
# def timestamp_from_date(date):
#     epoch = datetime.date(1970, 1, 1)
#     diff = date - epoch
#     return diff.days * 24 * 3600 + diff.seconds
# 
# Path: tests/settings.py
#     MANGOPAY_CLIENT_ID = 'sdk-unit-tests'
#     MANGOPAY_APIKEY = 'cqFfFrWfCcb7UadHNxx2C9Lo6Djw8ZduLi7J9USTmu8bhxxpju'
#     MANGOPAY_API_URL = 'https://api.mangopay.com/v2.01/'
#     MANGOPAY_API_SANDBOX_URL = 'https://api.sandbox.mangopay.com/v2.01/'
#     MANGOPAY_USE_SANDBOX = True
#     MANGOPAY_API_VERSION = 2
# MOCK_TESTS_RESPONSES = True


import json
import os
import re
import sys
import unittest
import responses
from datetime import datetime
from mangopay.utils import timestamp_from_date
from tests import settings
                'method': responses.PUT,
                'url': re.compile(
                    r'' + settings.MANGOPAY_API_SANDBOX_URL + settings.MANGOPAY_CLIENT_ID + '/cardregistrations/\d+'),
                'body': get_fixture('cardregistrations_update'),
                'status': 200
            },
            {
                'method': responses.GET,
                'url': re.compile(r'' + settings.MANGOPAY_API_SANDBOX_URL + settings.MANGOPAY_CLIENT_ID + '/cards/\d+'),
                'body': get_fixture('card'),
                'status': 200
            }])

    def mock_tokenization_request(self):
        self.register_mock({
            'method': responses.POST,
            'url': 'https://homologation-webpayment.payline.com/webpayment/getToken',
            'body': "data=gcpSOxwNHZutpFWmFCAYQu1kk25qPfJFdPaHT9kM3gKumDF3GeqSw8f-k8nh-s5OC3GNnhGoFONuAyg1RZQW6rVXooQ_ysKsz09HxQFEJfb-6H4zbY2Nnp1TliwkEFi4",
            'status': 200
        })

    def mock_user_list_full(self):
        self.register_mock({
            'method': responses.GET,
            'url': settings.MANGOPAY_API_SANDBOX_URL + settings.MANGOPAY_CLIENT_ID + '/users',
            'body': get_fixture('user_list_full'),
            'status': 200,
            'match_querystring': True
        })


# Path: mangopay/utils.py
# def timestamp_from_date(date):
#     epoch = datetime.date(1970, 1, 1)
#     diff = date - epoch
#     return diff.days * 24 * 3600 + diff.seconds
# 
# Path: tests/settings.py
#     MANGOPAY_CLIENT_ID = 'sdk-unit-tests'
#     MANGOPAY_APIKEY = 'cqFfFrWfCcb7UadHNxx2C9Lo6Djw8ZduLi7J9USTmu8bhxxpju'
#     MANGOPAY_API_URL = 'https://api.mangopay.com/v2.01/'
#     MANGOPAY_API_SANDBOX_URL = 'https://api.sandbox.mangopay.com/v2.01/'
#     MANGOPAY_USE_SANDBOX = True
#     MANGOPAY_API_VERSION = 2
# MOCK_TESTS_RESPONSES = True


# Path: tests/mocks.py
import json
import os
import re
import sys
import unittest
import responses
from datetime import datetime
from mangopay.utils import timestamp_from_date
from tests import settings

                'method': responses.PUT,
                'url': re.compile(
                    r'' + settings.MANGOPAY_API_SANDBOX_URL + settings.MANGOPAY_CLIENT_ID + '/cardregistrations/\d+'),
                'body': get_fixture('cardregistrations_update'),
                'status': 200
            },
            {
                'method': responses.GET,
                'url': re.compile(r'' + settings.MANGOPAY_API_SANDBOX_URL + settings.MANGOPAY_CLIENT_ID + '/cards/\d+'),
                'body': get_fixture('card'),
                'status': 200
            }])

    def mock_tokenization_request(self):
        self.register_mock({
            'method': responses.POST,
            'url': 'https://homologation-webpayment.payline.com/webpayment/getToken',
            'body': "data=gcpSOxwNHZutpFWmFCAYQu1kk25qPfJFdPaHT9kM3gKumDF3GeqSw8f-k8nh-s5OC3GNnhGoFONuAyg1RZQW6rVXooQ_ysKsz09HxQFEJfb-6H4zbY2Nnp1TliwkEFi4",
            'status': 200
        })

    def mock_user_list_full(self):
        self.register_mock({
            'method': responses.GET,
            'url': settings.MANGOPAY_API_SANDBOX_URL + settings.MANGOPAY_CLIENT_ID + '/users',
            'body': get_fixture('user_list_full'),
            'status': 200,
            'match_querystring': True
        })


    def mock_user_list_2_per_page_page1(self):