import unittest
from src.users.model import User


class TestUser(unittest.TestCase):
    """Tests User."""
    def setUp(self):
        """Sets up the user class."""
        self.user = User(**{'email': '<EMAIL>', 'username': 'maria',
                            'role': 'Admin'})

    def test_user_model(self):
        """GIVEN a User model.

        WHEN a new User is created. THEN check the email,
        hashed_password, username, and role fields are defined
        correctly.
        """
        self.assertEqual(self.user.email, '<EMAIL>')
        self.assertEqual(self.user.username, 'maria')
        self.assertEqual(self.user.role, 'Admin')

import unittest
from src.users.model import User


class TestUser(unittest.TestCase):
    """Tests User."""
    def setUp(self):
        """Sets up the user class."""
        self.user = User(**{'email': '<EMAIL>', 'username': 'maria',
                            'role': 'Admin'})

    def test_user_model(self):
        """GIVEN a User model.

        WHEN a new User is created. THEN check the email,
        hashed_password, username, and role fields are defined
        correctly.
        """
        self.assertEqual(self.user.email, '<EMAIL>')
        self.assertEqual(self.user.username, 'maria')
        self.assertEqual(self.user.role, 'Admin')

Tests User. Sets up the user class. GIVEN a User model.          WHEN a new User is created. THEN check the email,         hashed_password, username, and role fields are defined         correctly.