示例#1
0
    def test_show_changepassword(self):
        request = self.factory.get('/changepassword/')

        request.user = self.user

        response = views.usersettings(request)
        self.assertEqual(response.status_code, 200)
示例#2
0
    def test_modifie_usersettings_profile(self):
        request = self.factory.get('/usersettings/')

        request = self.factory.post('/usersettings/', {'firtstname': 'testTest', 'lastname': 'Desc', 'startday': 3, 'endday': 17, 'steps': 5, 'ayquisition': 0, 'email': '*****@*****.**'})
        request.user = self.user

        response = views.usersettings(request)

        profiles = len(UserProfile.objects.filter(startday=3))
        self.assertEqual(profiles, 0)