예제 #1
0
 def test__make_hash_value(self):
     token = TokenGenerator()
     result = token._make_hash_value(self.user_obj, self.user_obj.date_joined)
     string_add = str(self.user_obj.pk) + str(self.user_obj.date_joined) + str(self.user_obj.is_active)
     self.assertEqual(result, string_add)
예제 #2
0
 def test_make_hash_value(self):
     generator = TokenGenerator()
     token = generator._make_hash_value(self.user_pk,
                                        self.cleaned_timestamp)
     expected_token = str(self.user_pk) + str(self.cleaned_timestamp)
     assert token == expected_token