Example #1
0
 def test_user_create(self):
     user = User(email='*****@*****.**',
                 user_roles='Developer',
                 date_of_birth='1980-01-01',
                 first_name='Daniel',
                 last_name='Janak',
                 gender='M')
     self.assertEqual(user.get_full_name(), 'Daniel Janak')
     self.assertEqual(user.get_short_name(), user.first_name)
     self.assertEqual(user.total_posts(), 0)
     self.assertEqual(user.drafted_posts(), 0)
Example #2
0
    def setUp(self):
        self.client = Client(enforce_csrf_checks=False)
        self.user = User(email='*****@*****.**',
                         user_roles='Developer',
                         date_of_birth='1980-01-01',
                         first_name='Daniel',
                         last_name='Janak',
                         is_admin=True,
                         gender='M')

        self.user.set_password('password')
        self.user.save()
        self.password = '******'
Example #3
0
class UserDetails(TestCase):

    def setUp(self):
        self.client = Client(enforce_csrf_checks=False)
        self.user = User(email='*****@*****.**',
                         user_roles='Developer',
                         date_of_birth='1980-01-01',
                         first_name='Daniel',
                         last_name='Janak',
                         is_admin=True,
                         gender='M')

        self.user.set_password('password')
        self.user.save()
        self.password = '******'
Example #4
0
 def test_user_create(self):
     user = User(email='*****@*****.**',
                 user_roles='Developer',
                 date_of_birth='1980-01-01',
                 first_name='Daniel',
                 last_name='Janak',
                 gender='M')
     self.assertEqual(user.get_full_name(), 'Daniel Janak')
     self.assertEqual(user.get_short_name(), user.first_name)
     self.assertEqual(user.total_posts(), 0)
     self.assertEqual(user.drafted_posts(), 0)