Skip to content

Instantly share code, notes, and snippets.

View JYC11's full-sized avatar

Jaeyoon Cho JYC11

  • South Korea
View GitHub Profile
from django.shortcuts import render
from rest_framework import status
from rest_framework.decorators import api_view, permission_classes
from rest_framework.response import Response
from rest_framework.permissions import IsAuthenticated, IsAdminUser
from core.models import Product, Order, OrderItem, ShippingAddress
from .serializers import OrderSerializer
from utils.helper_functions import order_total_checker
from django.contrib.auth import get_user_model
from django.contrib.auth.hashers import make_password
from django.test import TestCase
from rest_framework.test import APIClient
from django.urls import reverse
from rest_framework import status
from core.models import Order, OrderItem, ShippingAddress, Product
from order.serializers import OrderSerializer
from product.mock_data import stuff
from user.tests.test_user_api import create_user