<gh_stars>0
from django.contrib.auth.models import User
from rest_framework import status
from rest_framework.test import APITestCase
from rest_framework.reverse import reverse
from chigre.serializers import UserSerializer

class BeerTypeReadTest(APITestCase): 
    def setUp(self):
        self.superuser = User.objects.create_superuser('john', '<EMAIL>', '<PASSWORD>')
        self.client.login(username='john', password='<PASSWORD>')
                  
    def test_read_beertype(self):
        """
        Ensure we can read authenticated user object.
        """
        url = reverse('user-auth-info')
        response = self.client.get(url, format='json')
        self.assertEqual(response.status_code, status.HTTP_200_OK)
from django.contrib.auth.models import User
from rest_framework import status
from rest_framework.test import APITestCase
from rest_framework.reverse import reverse
from chigre.serializers import UserSerializer

class BeerTypeReadTest(APITestCase): 
    def setUp(self):
        self.superuser = User.objects.create_superuser('john', '<EMAIL>', '<PASSWORD>')
        self.client.login(username='john', password='<PASSWORD>')
                  
    def test_read_beertype(self):
        """
        Ensure we can read authenticated user object.
        """
        url = reverse('user-auth-info')
        response = self.client.get(url, format='json')
        self.assertEqual(response.status_code, status.HTTP_200_OK)
Ensure we can read authenticated user object.