<s> from mock import patch <EOL> from hc . payments . models import Subscription <EOL> from hc . test import BaseTestCase <EOL> class GetClientTokenTestCase ( BaseTestCase ) : <EOL> @ patch ( "<STR_LIT>" ) <EOL> def test_it_works ( self , mock_braintree ) : <EOL> mock_braintree . ClientToken . generate . return_value = "<STR_LIT>" <EOL> self . client . login ( username = "<STR_LIT>" , password = "<STR_LIT:password>" ) <EOL> r = self . client . get ( "<STR_LIT>" ) <EOL> self . assertContains ( r , "<STR_LIT>" , status_code = <NUM_LIT:200> ) <EOL> assert Subscription . objects . count ( ) == <NUM_LIT:1> </s>
