"""Utilities to test subaccounts.""" from owsresponse import response def subaccount_response(): """Create a response.Response fixture for subaccount data.""" return response.Response( { 'subaccount_id': 1, 'vendor_id': 1, 'subaccount_name': 'Subaccount 1', 'description': 'Subaccount Description 1', 'date_deleted': None, } ) def grass_subaccount_account(subaccount): """ Create GrassAccount named tuple describing subaccount. Args: subaccount (response.Response): result from subaccount_response() """ return ('subaccount', subaccount) def fixture_identity_subaccount(): """Fixture for subaccount.""" return response.Response( { 'account_id': 1, 'account_type': 'subaccount', 'account_name': 'FatCat Records, Subaccount', 'country_id': 1, } )