Source code for shuup.testing.supplier_provider
from shuup.core.models import Supplier
[docs]
class UsernameSupplierProvider:
[docs]
@classmethod
def get_supplier(cls, request, **kwargs):
return Supplier.objects.filter(identifier=request.user.username).first()