"""Utilities to test vendors.""" from owsresponse import response def fixture_vendor(): """Fixture for vendor.""" return 'my_vendor' def fixture_grass_vendor_account(fixture_vendor): """Create GrassAccount named tuple describing vendor.""" return ('vendor', fixture_vendor) def fixture_full_vendor(): """Fixture for vendor.""" return response.Response({'vendor_id': 2, 'name': 'Vendor 2'}) def fixture_identity_vendor(): """Fixture for vendor identity.""" return response.Response( { 'account_id': 2, 'account_type': 'vendor', 'account_name': 'FatCat Records', 'country_id': 1, } ) def fixture_valid_vendor_no_name(): """Fixture response for a vendor with empty name field.""" return response.Response( { 'vendor_id': 1, 'is_distributor': 'Y', 'name': None, 'company': 'Funky Vendor', 'company_brand': 'test_awal', 'country_id': 1, 'owner': 'odd', 'vendor_uuid': 'd6455851-3f86-48d7-b102-8d006eb92655', 'assigned_reviewer': 123, } ) def fixture_valid_vendor_no_company(): """Fixture response for a vendor with empty company field.""" return response.Response( { 'vendor_id': 1, 'is_distributor': 'Y', 'name': 'Funky Vendor', 'company': None, 'company_brand': '', 'country_id': 1, 'owner': 'odd', 'vendor_uuid': 'd6455851-3f86-48d7-b102-8d006eb92655', 'assigned_reviewer': 123, } )