djblets.testing.decorators¶
- add_fixtures(fixtures, replace=False)¶
Adds or replaces the fixtures used for this test.
This must be used along with
djblets.testing.testcases.TestCase()
.
- requires_user_profile(f)¶
Ensure that User.get_profile exists for the following unit test.
In Django 1.7+,
User.get_profile
no longer exists. Currently some parts of Djblets require this method to exist in Django or be added by the consuming app. To fix this requirement for unit testing on Django 1.7+, we attach a method that raisesNotImplementedError
when the method does not exist. After the test exits the method will be removed.