from rest_framework.test import APIClient
from django.test import TestCase


class BaseSetUp(TestCase):
    """Base class for all the test classes"""

    def __init__(self):
        """Initialize test data"""
        self.client = APIClient()
        self.reg_data = {'user': {
            'username': 'remmy',
            'email': '<EMAIL>',
            'password': '<PASSWORD>'
        }}
        # register a user
        self.client.post(
            'api/users',
            self.reg_data,
            format="json")

from rest_framework.test import APIClient
from django.test import TestCase


class BaseSetUp(TestCase):
    """Base class for all the test classes"""

    def __init__(self):
        """Initialize test data"""
        self.client = APIClient()
        self.reg_data = {'user': {
            'username': 'remmy',
            'email': '<EMAIL>',
            'password': '<PASSWORD>'
        }}
        # register a user
        self.client.post(
            'api/users',
            self.reg_data,
            format="json")

Base class for all the test classes Initialize test data # register a user