# Path: openprovider/models.py
# class Reseller(Model):
#     """
#     A reseller profile.
# 
#     id
#     companyName
#     address
#     phone
#     fax
#     vatperc
#     balance
#     reservedBalance
#     """
# 
#     address = submodel(Address, "address")
#     phone = submodel(Phone, "phone")
#     fax = submodel(Phone, "fax")
# 
# class Address(Model):
#     """
#     A physical street address.
# 
#     street (required)
#     number (required)
#     suffix (optional)
#     zipcode (required)
#     city (required)
#     state (optional)
#     country (required)
#     """
# 
#     def __eq__(self, other):
#         attributes = ['street', 'number', 'suffix', 'zipcode', 'city', 'state', 'country']
#         return all(getattr(self, attr, None) == getattr(other, attr, None) for attr in attributes)
# 
# Path: tests/api_tests.py
# def betamaxed(original_function):
#     @wraps(original_function)
#     def new_function(api, *args, **kwargs):
#         with Betamax(api.session).use_cassette(original_function.__name__):
#             return original_function(api, *args, **kwargs)
# 
#     return new_function


from openprovider.models import Reseller, Address
from . import betamaxed



@betamaxed
def test_reseller_retrieve(api):
    r = api.reseller.retrieve()

# Path: openprovider/models.py
# class Reseller(Model):
#     """
#     A reseller profile.
# 
#     id
#     companyName
#     address
#     phone
#     fax
#     vatperc
#     balance
#     reservedBalance
#     """
# 
#     address = submodel(Address, "address")
#     phone = submodel(Phone, "phone")
#     fax = submodel(Phone, "fax")
# 
# class Address(Model):
#     """
#     A physical street address.
# 
#     street (required)
#     number (required)
#     suffix (optional)
#     zipcode (required)
#     city (required)
#     state (optional)
#     country (required)
#     """
# 
#     def __eq__(self, other):
#         attributes = ['street', 'number', 'suffix', 'zipcode', 'city', 'state', 'country']
#         return all(getattr(self, attr, None) == getattr(other, attr, None) for attr in attributes)
# 
# Path: tests/api_tests.py
# def betamaxed(original_function):
#     @wraps(original_function)
#     def new_function(api, *args, **kwargs):
#         with Betamax(api.session).use_cassette(original_function.__name__):
#             return original_function(api, *args, **kwargs)
# 
#     return new_function


# Path: tests/test_reseller.py
from openprovider.models import Reseller, Address
from . import betamaxed




@betamaxed
def test_reseller_retrieve(api):
    r = api.reseller.retrieve()

    assert isinstance(r, Reseller)