Fix issues with the new kgb on Django 1.11 and in @requires_user_profile.

Review Request #9668 — Created Feb. 18, 2018 and submitted

Information

Djblets
release-1.0.x
0509327...

Reviewers

The new version of kgb made some changes that resulted in more strict
function signatures. While most of these were fixed, there were a few
signatures found that were not compatible with Django 1.11 (which added
new optional arguments not handled by our overriding functions). These
were fixed up to take variable arguments.

The @requires_user_profile decorator was also impacted, but in a
different way. It was checking for a particular attribute on a function
to determine if it was a spy, but the attribute chosen wasn't considered
public, and has since changed. This was updated to check for the unspy
method instead, which is safer and prevents unit tests from leaking
state.

Unit tests pass with kgb 2.0 for Django 1.6 and 1.11 (when used along
with other pending changes).

Description From Last Updated

typo: "@requires_uesr_profile" in summary

brenniebrennie
brennie
  1. 
      
  2. Show all issues

    typo: "@requires_uesr_profile" in summary

  3. 
      
david
  1. Once the typo is fixed I'm happy.

  2. 
      
chipx86
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (5087e55)
Loading...