Did I find the right examples for you? yes no

All Samples(132)  |  Call(132)  |  Derive(0)  |  Import(0)

src/r/e/recurly-2.1.14/tests/test_resources.py   recurly(Download)
        with self.mock_request('account/created.xml'):
            account.save()
        self.assertEqual(account._url, urljoin(recurly.base_uri(), 'accounts/%s' % account_code))
        self.assertEqual(account.vat_number, '444444-UK')
 
        with self.mock_request('account/list-active.xml'):
            active = Account.all_active()
        self.assertTrue(len(active) >= 1)
        self.assertEqual(active[0].account_code, account_code)
        self.assertTrue(isinstance(same_account, Account))
        self.assertTrue(same_account is not account)
        self.assertEqual(same_account.account_code, account_code)
        self.assertTrue(same_account.first_name is None)
        self.assertEqual(same_account._url, urljoin(recurly.base_uri(), 'accounts/%s' % account_code))

src/r/e/recurly-client-python-HEAD/tests/test_resources.py   recurly-client-python(Download)
        with self.mock_request('account/created.xml'):
            account.save()
        self.assertEqual(account._url, urljoin(recurly.base_uri(), 'accounts/%s' % account_code))
        self.assertEqual(account.vat_number, '444444-UK')
 
        with self.mock_request('account/list-active.xml'):
            active = Account.all_active()
        self.assertTrue(len(active) >= 1)
        self.assertEqual(active[0].account_code, account_code)
        self.assertTrue(isinstance(same_account, Account))
        self.assertTrue(same_account is not account)
        self.assertEqual(same_account.account_code, account_code)
        self.assertTrue(same_account.first_name is None)
        self.assertEqual(same_account._url, urljoin(recurly.base_uri(), 'accounts/%s' % account_code))

src/r/e/recurly-2.1.14/tests/test_js.py   recurly(Download)
            'd': ':',
        }
        self.assertEqual(recurly.js.to_query(message), 'a%5Ba1%5D=123&a%5Ba2%5D=abcdef&b%5B%5D=1&b%5B%5D=2&b%5B%5D=3&c%5B1%5D=4&c%5B2%5D=5&c%5B3%5D=6&d=%3A')
 
    def test_sign(self):
        self.assertTrue(re.search('nonce=', recurly.js.sign()))
        self.assertTrue(re.search('timestamp=', recurly.js.sign()))
        self.assertEqual(
            recurly.js.sign({'timestamp': 1312701386, 'nonce': 1}),
        )
        self.assertEqual(
            recurly.js.sign(recurly.Account(account_code='1'), {'timestamp': 1312701386, 'nonce': 1}),
            '82bcbbd4deb8b1b663b7407d9085dc67e2922df7|account%5Baccount_code%5D=1&nonce=1&timestamp=1312701386'
        )

src/r/e/recurly-client-python-HEAD/tests/test_js.py   recurly-client-python(Download)
            'd': ':',
        }
        self.assertEqual(recurly.js.to_query(message), 'a%5Ba1%5D=123&a%5Ba2%5D=abcdef&b%5B%5D=1&b%5B%5D=2&b%5B%5D=3&c%5B1%5D=4&c%5B2%5D=5&c%5B3%5D=6&d=%3A')
 
    def test_sign(self):
        self.assertTrue(re.search('nonce=', recurly.js.sign()))
        self.assertTrue(re.search('timestamp=', recurly.js.sign()))
        self.assertEqual(
            recurly.js.sign({'timestamp': 1312701386, 'nonce': 1}),
        )
        self.assertEqual(
            recurly.js.sign(recurly.Account(account_code='1'), {'timestamp': 1312701386, 'nonce': 1}),
            '82bcbbd4deb8b1b663b7407d9085dc67e2922df7|account%5Baccount_code%5D=1&nonce=1&timestamp=1312701386'
        )