+ def testUserProfileValidPost(self):
+ user_profile = UserProfile.objects.get(user=self.user.user.id)
+ old_ppp = user_profile.patches_per_page
+ new_ppp = old_ppp + 1
+
+ response = self.client.post('/user/', {'patches_per_page': new_ppp})
+
+ user_profile = UserProfile.objects.get(user=self.user.user.id)
+ self.assertEquals(user_profile.patches_per_page, new_ppp)
+
+ def testUserProfileInvalidPost(self):
+ user_profile = UserProfile.objects.get(user=self.user.user.id)
+ old_ppp = user_profile.patches_per_page
+ new_ppp = -1
+
+ response = self.client.post('/user/', {'patches_per_page': new_ppp})
+
+ user_profile = UserProfile.objects.get(user=self.user.user.id)
+ self.assertEquals(user_profile.patches_per_page, old_ppp)
+
+