<gh_stars>0
from django.test import TestCase
from django.contrib.auth.models import User
from django.test import Client

class TestModels(TestCase):
    def setUp(self):
        user = User.objects.create(username='testuser')
        user.set_password('<PASSWORD>')
        user.save()

    def test_login_with_wrong_password(self):
        """Login with wrong password"""
        c = Client()
        logged_in = c.login(username='testuser', password='<PASSWORD>')
        self.assertFalse(logged_in)

    def test_login_with_correct_password(self):
        """Login with correct password"""
        c = Client()
        logged_in = c.login(username='testuser', password='<PASSWORD>')
        self.assertTrue(logged_in)