in server/store/tests.py [0:0]
def create_product(obj):
payload = ProductSerializer(obj).data
user = User.objects.create_superuser(username="test", password="test")
client.force_login(user)
response = client.post(
reverse("product-list"),
json.dumps(payload, cls=DecimalEncoder),
content_type="application/json",
)
return response