• 
      

    Add infrastructure to help apps offer extension testing functionality.

    Review Request #8290 — Created July 16, 2016 and submitted

    Information

    Djblets
    release-0.10.x
    5f4037a...

    Reviewers

    This provides some new classes that applications can use to help
    extension authors write unit tests for their extensions.

    There's a new test runner class that handles setting up a Django
    environment, configuring basic Djblets settings, and handling static
    media collection. This can easily form the base test runner for any
    Django applications, not just those with extensions, but it's also
    useful for extension test cases.

    There's also a new mixin for unit test: ExtensionTestCaseMixin. This
    makes it easy to get a registered/enabled extension instance for a given
    extension class, so that unit tests can be written utilizing that
    extension.

    Documentation has been written on making use of these in a product.

    Based on work by Weijie Sun.

    Updated Review Board to make use of this and modified Power Pack to use
    the new infrastructure. I successfully completed a unit test run.

    Built the docs and read through them. Tested the code samples.

    Description From Last Updated

    Can't this all just be shutil.rmtree(self.tempdir)?

    daviddavid
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          djblets/extensions/testing/testcases.py
          djblets/testing/testrunners.py
          djblets/extensions/testing/__init__.py
      
      Ignored Files:
          docs/djblets/guides/extensions/testing-extensions.rst
          docs/djblets/guides/extensions/index.rst
          docs/djblets/coderef/index.rst
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          djblets/extensions/testing/testcases.py
          djblets/testing/testrunners.py
          djblets/extensions/testing/__init__.py
      
      Ignored Files:
          docs/djblets/guides/extensions/testing-extensions.rst
          docs/djblets/guides/extensions/index.rst
          docs/djblets/coderef/index.rst
      
      
    2. 
        
    david
    1. 
        
    2. djblets/testing/testrunners.py (Diff revision 1)
       
       
       
       
       
       
       
       
       
       
       
       
       
       
      Show all issues

      Can't this all just be shutil.rmtree(self.tempdir)?

      1. Probably. I wasn't sure why it wasn't to begin with, and was hesitant to change it, but maybe we just didn't know about shutil.rmtree then?

    3. 
        
    chipx86
    reviewbot
    1. Tool: PEP8 Style Checker
      Processed Files:
          djblets/extensions/testing/testcases.py
          djblets/testing/testrunners.py
          djblets/extensions/testing/__init__.py
      
      Ignored Files:
          docs/djblets/guides/extensions/testing-extensions.rst
          docs/djblets/guides/extensions/index.rst
          docs/djblets/coderef/index.rst
      
      
      
      Tool: Pyflakes
      Processed Files:
          djblets/extensions/testing/testcases.py
          djblets/testing/testrunners.py
          djblets/extensions/testing/__init__.py
      
      Ignored Files:
          docs/djblets/guides/extensions/testing-extensions.rst
          docs/djblets/guides/extensions/index.rst
          docs/djblets/coderef/index.rst
      
      
    2. 
        
    chipx86
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          djblets/extensions/testing/testcases.py
          djblets/testing/testrunners.py
          djblets/extensions/testing/__init__.py
      
      Ignored Files:
          docs/djblets/guides/extensions/testing-extensions.rst
          docs/djblets/guides/extensions/index.rst
          docs/djblets/coderef/index.rst
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          djblets/extensions/testing/testcases.py
          djblets/testing/testrunners.py
          djblets/extensions/testing/__init__.py
      
      Ignored Files:
          docs/djblets/guides/extensions/testing-extensions.rst
          docs/djblets/guides/extensions/index.rst
          docs/djblets/coderef/index.rst
      
      
    2. 
        
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-0.10.x (a2b0c42)