Exemplo n.º 1
0
    def setUp(self):
        super(TestSendSMSMessage, self).setUp()

        try:
            config_path = os.path.join(os.path.dirname(DIR), '.env')
            config.update_with_file(config_path)
        except:
            pass

        self.client = SMSClient('+' + str(config.TWILIO_SMS_SENDING_NUMBER),
                                config.TWILIO_ACCOUNT_SID,
                                config.TWILIO_AUTH_TOKEN)

        self.username = uuid().hex.lower()
        self.name = '%s %s' % (self.username[:16], self.username[16:])
        self.email = '*****@*****.**' % self.username
        self.user = self.create_user(self.username, self.name, self.email)
Exemplo n.º 2
0
    def setUp(self):
        super(TestTokenExchange, self).setUp()
        self.currency = CurrencyModel.query.filter_by(code='USD').first()
        self.fee = FeeModel.query.get(1)

        n = uuid().hex
        username = '******' % n[:16]
        name = 'StripeUser %s' % n[16:]
        email = '*****@*****.**' % n[16:]
        self.user = self.create_user(username, name, email=email)

        try:
            config_path = os.path.join(os.path.dirname(DIR), '.env')
            config.update_with_file(config_path)
        except:
            pass

        self.logger_patcher = patch('pooldlib.payment.logger')
        self.patched_logger = self.logger_patcher.start()
        self.addCleanup(self.logger_patcher.stop)
Exemplo n.º 3
0
    def setUp(self):
        super(TestTokenExchange, self).setUp()
        self.currency = CurrencyModel.query.filter_by(code='USD').first()
        self.fee = FeeModel.query.get(1)

        n = uuid().hex
        username = '******' % n[:16]
        name = 'StripeUser %s' % n[16:]
        email = '*****@*****.**' % n[16:]
        self.user = self.create_user(username, name, email=email)

        try:
            config_path = os.path.join(os.path.dirname(DIR), '.env')
            config.update_with_file(config_path)
        except:
            pass

        self.logger_patcher = patch('pooldlib.payment.logger')
        self.patched_logger = self.logger_patcher.start()
        self.addCleanup(self.logger_patcher.stop)