Did I find the right examples for you? yes no

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

src/r/e/recurly-2.1.14/tests/test_resources.py   recurly(Download)
    def test_account(self):
        account_code = 'test%s' % self.test_id
        with self.mock_request('account/does-not-exist.xml'):
            self.assertRaises(NotFoundError, Account.get, account_code)
 
        account = Account(account_code=account_code)
        account.vat_number = '444444-UK'
        with self.mock_request('account/created.xml'):
        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)
 
        with self.mock_request('account/exists.xml'):
        account.company_name = 'Home Box Office'
        account.accept_language = 'en-US'
        with self.mock_request('account/update-bad-email.xml'):
            try:
                account.save()

src/r/e/recurly-client-python-HEAD/tests/test_resources.py   recurly-client-python(Download)
    def test_account(self):
        account_code = 'test%s' % self.test_id
        with self.mock_request('account/does-not-exist.xml'):
            self.assertRaises(NotFoundError, Account.get, account_code)
 
        account = Account(account_code=account_code)
        account.vat_number = '444444-UK'
        with self.mock_request('account/created.xml'):
        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)
 
        with self.mock_request('account/exists.xml'):
        account.company_name = 'Home Box Office'
        account.accept_language = 'en-US'
        with self.mock_request('account/update-bad-email.xml'):
            try:
                account.save()