def setUp(self):
    self.client = Client()
    User = get_user_model()
    user = User.objects.create_superuser(username='test', email='example@example.com', password='test')
    if (django.VERSION <= (1, 9)):
        self.client.login(username='test', password='test')
    else:
        self.client.force_login(user)
def setUp(self):
    self.client = Client()
    User = get_user_model()
    user = User.objects.create_superuser(username='test', email='example@example.com', password='test')
    if (django.VERSION <= (1, 9)):
        self.client.login(username='test', password='test')
    else:
        self.client.force_login(user)