'Assert against the password reuse policy but using the normal Django PBKDF2'

@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.PBKDF2PasswordHasher',))
@patch.dict('django.conf.settings.ADVANCED_SECURITY_CONFIG', {'MIN_DIFFERENT_STAFF_PASSWORDS_BEFORE_REUSE': 2})
@patch.dict('django.conf.settings.ADVANCED_SECURITY_CONFIG', {'MIN_DIFFERENT_STUDENT_PASSWORDS_BEFORE_REUSE': 1})
def test_pbkdf2_sha256_password_reuse(self):

    user = self._user_factory_with_history()
    staff = self._user_factory_with_history(is_staff=True)
    self.assertFalse(PasswordHistory.is_allowable_password_reuse(user, 'test'))
    self.assertTrue(PasswordHistory.is_allowable_password_reuse(user, 'different'))
    self._change_password(user, 'different')
    self.assertTrue(PasswordHistory.is_allowable_password_reuse(user, 'test'))
    self.assertFalse(PasswordHistory.is_allowable_password_reuse(staff, 'test'))
    self.assertTrue(PasswordHistory.is_allowable_password_reuse(staff, 'different'))
    self._change_password(staff, 'different')
    self.assertFalse(PasswordHistory.is_allowable_password_reuse(staff, 'test'))
    self.assertFalse(PasswordHistory.is_allowable_password_reuse(staff, 'different'))
    self.assertTrue(PasswordHistory.is_allowable_password_reuse(staff, 'third'))
    self._change_password(staff, 'third')
    self.assertTrue(PasswordHistory.is_allowable_password_reuse(staff, 'test'))
