Browse Source

HUE-3287 [core] Django 1.11 upgrade
- Upgrading django-nose-1.3 => django-nose-1.4.5 module

Prakash Ranade 8 years ago
parent
commit
86e25017c0
64 changed files with 2500 additions and 991 deletions
  1. 0 7
      desktop/core/ext-py/django-nose-1.3/MANIFEST.in
  2. 0 387
      desktop/core/ext-py/django-nose-1.3/PKG-INFO
  3. 0 28
      desktop/core/ext-py/django-nose-1.3/changelog.txt
  4. 0 9
      desktop/core/ext-py/django-nose-1.3/django_nose/__init__.py
  5. 0 0
      desktop/core/ext-py/django-nose-1.3/django_nose/management/commands/__init__.py
  6. 0 33
      desktop/core/ext-py/django-nose-1.3/django_nose/management/commands/test.py
  7. 0 74
      desktop/core/ext-py/django-nose-1.3/django_nose/tools.py
  8. 0 54
      desktop/core/ext-py/django-nose-1.3/runtests.sh
  9. 0 5
      desktop/core/ext-py/django-nose-1.3/setup.cfg
  10. 0 0
      desktop/core/ext-py/django-nose-1.3/testapp/__init__.py
  11. 0 16
      desktop/core/ext-py/django-nose-1.3/testapp/settings.py
  12. 0 15
      desktop/core/ext-py/django-nose-1.3/testapp/settings_old_style.py
  13. 0 6
      desktop/core/ext-py/django-nose-1.3/testapp/settings_with_plugins.py
  14. 0 4
      desktop/core/ext-py/django-nose-1.3/testapp/settings_with_south.py
  15. 61 0
      desktop/core/ext-py/django-nose-1.4.5/AUTHORS.rst
  16. 137 0
      desktop/core/ext-py/django-nose-1.4.5/CONTRIBUTING.rst
  17. 0 0
      desktop/core/ext-py/django-nose-1.4.5/LICENSE
  18. 20 0
      desktop/core/ext-py/django-nose-1.4.5/MANIFEST.in
  19. 76 0
      desktop/core/ext-py/django-nose-1.4.5/Makefile
  20. 160 0
      desktop/core/ext-py/django-nose-1.4.5/PKG-INFO
  21. 57 0
      desktop/core/ext-py/django-nose-1.4.5/README.rst
  22. 123 0
      desktop/core/ext-py/django-nose-1.4.5/changelog.rst
  23. 23 0
      desktop/core/ext-py/django-nose-1.4.5/contribute.json
  24. 12 0
      desktop/core/ext-py/django-nose-1.4.5/django_nose/__init__.py
  25. 33 14
      desktop/core/ext-py/django-nose-1.4.5/django_nose/fixture_tables.py
  26. 1 0
      desktop/core/ext-py/django-nose-1.4.5/django_nose/management/__init__.py
  27. 1 0
      desktop/core/ext-py/django-nose-1.4.5/django_nose/management/commands/__init__.py
  28. 25 0
      desktop/core/ext-py/django-nose-1.4.5/django_nose/management/commands/test.py
  29. 32 22
      desktop/core/ext-py/django-nose-1.4.5/django_nose/plugin.py
  30. 218 127
      desktop/core/ext-py/django-nose-1.4.5/django_nose/runner.py
  31. 9 5
      desktop/core/ext-py/django-nose-1.4.5/django_nose/testcases.py
  32. 91 0
      desktop/core/ext-py/django-nose-1.4.5/django_nose/tools.py
  33. 9 3
      desktop/core/ext-py/django-nose-1.4.5/django_nose/utils.py
  34. 177 0
      desktop/core/ext-py/django-nose-1.4.5/docs/Makefile
  35. 0 0
      desktop/core/ext-py/django-nose-1.4.5/docs/_static/.keep
  36. 1 0
      desktop/core/ext-py/django-nose-1.4.5/docs/authors.rst
  37. 1 0
      desktop/core/ext-py/django-nose-1.4.5/docs/changelog.rst
  38. 263 0
      desktop/core/ext-py/django-nose-1.4.5/docs/conf.py
  39. 1 0
      desktop/core/ext-py/django-nose-1.4.5/docs/contributing.rst
  40. 29 0
      desktop/core/ext-py/django-nose-1.4.5/docs/index.rst
  41. 33 0
      desktop/core/ext-py/django-nose-1.4.5/docs/installation.rst
  42. 242 0
      desktop/core/ext-py/django-nose-1.4.5/docs/make.bat
  43. 51 0
      desktop/core/ext-py/django-nose-1.4.5/docs/upgrading.rst
  44. 14 170
      desktop/core/ext-py/django-nose-1.4.5/docs/usage.rst
  45. 11 0
      desktop/core/ext-py/django-nose-1.4.5/manage.py
  46. 5 0
      desktop/core/ext-py/django-nose-1.4.5/requirements-rtd.txt
  47. 39 0
      desktop/core/ext-py/django-nose-1.4.5/requirements.txt
  48. 190 0
      desktop/core/ext-py/django-nose-1.4.5/runtests.sh
  49. 23 0
      desktop/core/ext-py/django-nose-1.4.5/setup.cfg
  50. 39 7
      desktop/core/ext-py/django-nose-1.4.5/setup.py
  51. 1 0
      desktop/core/ext-py/django-nose-1.4.5/testapp/__init__.py
  52. 6 0
      desktop/core/ext-py/django-nose-1.4.5/testapp/custom_runner.py
  53. 19 0
      desktop/core/ext-py/django-nose-1.4.5/testapp/fixtures/testdata.json
  54. 42 0
      desktop/core/ext-py/django-nose-1.4.5/testapp/migrations/0001_initial.py
  55. 1 0
      desktop/core/ext-py/django-nose-1.4.5/testapp/migrations/__init__.py
  56. 30 0
      desktop/core/ext-py/django-nose-1.4.5/testapp/models.py
  57. 2 0
      desktop/core/ext-py/django-nose-1.4.5/testapp/plugin_t/test_with_plugins.py
  58. 5 1
      desktop/core/ext-py/django-nose-1.4.5/testapp/plugins.py
  59. 5 4
      desktop/core/ext-py/django-nose-1.4.5/testapp/runtests.py
  60. 47 0
      desktop/core/ext-py/django-nose-1.4.5/testapp/settings.py
  61. 1 0
      desktop/core/ext-py/django-nose-1.4.5/testapp/test_for_nose.py
  62. 1 0
      desktop/core/ext-py/django-nose-1.4.5/testapp/test_only_this.py
  63. 50 0
      desktop/core/ext-py/django-nose-1.4.5/testapp/tests.py
  64. 83 0
      desktop/core/ext-py/django-nose-1.4.5/unittests/test_databases.py

+ 0 - 7
desktop/core/ext-py/django-nose-1.3/MANIFEST.in

@@ -1,7 +0,0 @@
-include LICENSE
-include README.rst
-include runtests.sh
-include changelog.txt
-recursive-exclude django_nose *.py[co]
-recursive-include testapp *
-recursive-exclude testapp *.py[co]

+ 0 - 387
desktop/core/ext-py/django-nose-1.3/PKG-INFO

@@ -1,387 +0,0 @@
-Metadata-Version: 1.1
-Name: django-nose
-Version: 1.3
-Summary: Makes your Django tests simple and snappy
-Home-page: http://github.com/django-nose/django-nose
-Author: Erik Rose
-Author-email: erikrose@grinchcentral.com
-License: BSD
-Description: ===========
-        django-nose
-        ===========
-        
-        .. image:: https://travis-ci.org/django-nose/django-nose.png
-          :target: https://travis-ci.org/django-nose/django-nose
-        
-        Features
-        --------
-        
-        * All the goodness of `nose`_ in your Django tests, like...
-        
-          * Testing just your apps by default, not all the standard ones that happen to
-            be in ``INSTALLED_APPS``
-          * Running the tests in one or more specific modules (or apps, or classes, or
-            folders, or just running a specific test)
-          * Obviating the need to import all your tests into ``tests/__init__.py``.
-            This not only saves busy-work but also eliminates the possibility of
-            accidentally shadowing test classes.
-          * Taking advantage of all the useful `nose plugins`_
-        * Fixture bundling, an optional feature which speeds up your fixture-based
-          tests by a factor of 4
-        * Reuse of previously created test DBs, cutting 10 seconds off startup time
-        * Hygienic TransactionTestCases, which can save you a DB flush per test
-        * Support for various databases. Tested with MySQL, PostgreSQL, and SQLite.
-          Others should work as well.
-        
-        .. _nose: http://somethingaboutorange.com/mrl/projects/nose/
-        .. _nose plugins: http://nose-plugins.jottit.com/
-        
-        
-        Installation
-        ------------
-        
-        You can get django-nose from PyPI with... ::
-        
-            pip install django-nose
-        
-        The development version can be installed with... ::
-        
-            pip install -e git://github.com/django-nose/django-nose.git#egg=django-nose
-        
-        Since django-nose extends Django's built-in test command, you should add it to
-        your ``INSTALLED_APPS`` in ``settings.py``::
-        
-            INSTALLED_APPS = (
-                ...
-                'django_nose',
-                ...
-            )
-        
-        Then set ``TEST_RUNNER`` in ``settings.py``::
-        
-            TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
-        
-        
-        Use
-        ---
-        
-        The day-to-day use of django-nose is mostly transparent; just run ``./manage.py
-        test`` as usual.
-        
-        See ``./manage.py help test`` for all the options nose provides, and look to
-        the `nose docs`_ for more help with nose.
-        
-        .. _nose docs: http://somethingaboutorange.com/mrl/projects/nose/
-        
-        
-        Enabling Database Reuse
-        -----------------------
-        
-        You can save several seconds at the beginning and end of your test suite by
-        reusing the test database from the last run. To do this, set the environment
-        variable ``REUSE_DB`` to 1::
-        
-            REUSE_DB=1 ./manage.py test
-        
-        The one new wrinkle is that, whenever your DB schema changes, you should leave
-        the flag off the next time you run tests. This will cue the test runner to
-        reinitialize the test database.
-        
-        Also, REUSE_DB is not compatible with TransactionTestCases that leave junk in
-        the DB, so be sure to make your TransactionTestCases hygienic (see below) if
-        you want to use it.
-        
-        
-        Enabling Fast Fixtures
-        ----------------------
-        
-        django-nose includes a fixture bundler which drastically speeds up your tests
-        by eliminating redundant setup of Django test fixtures. To use it...
-        
-        1. Subclass ``django_nose.FastFixtureTestCase`` instead of
-           ``django.test.TestCase``. (I like to import it ``as TestCase`` in my
-           project's ``tests/__init__.py`` and then import it from there into my actual
-           tests. Then it's easy to sub the base class in and out.) This alone will
-           cause fixtures to load once per class rather than once per test.
-        2. Activate fixture bundling by passing the ``--with-fixture-bundling`` option
-           to ``./manage.py test``. This loads each unique set of fixtures only once,
-           even across class, module, and app boundaries.
-        
-        How Fixture Bundling Works
-        ~~~~~~~~~~~~~~~~~~~~~~~~~~
-        
-        The fixture bundler reorders your test classes so that ones with identical sets
-        of fixtures run adjacently. It then advises the first of each series to load
-        the fixtures once for all of them (and the remaining ones not to bother). It
-        also advises the last to tear them down. Depending on the size and repetition
-        of your fixtures, you can expect a 25% to 50% speed increase.
-        
-        Incidentally, the author prefers to avoid Django fixtures, as they encourage
-        irrelevant coupling between tests and make tests harder to comprehend and
-        modify. For future tests, it is better to use the "model maker" pattern,
-        creating DB objects programmatically. This way, tests avoid setup they don't
-        need, and there is a clearer tie between a test and the exact state it
-        requires. The fixture bundler is intended to make existing tests, which have
-        already committed to fixtures, more tolerable.
-        
-        Troubleshooting
-        ~~~~~~~~~~~~~~~
-        
-        If using ``--with-fixture-bundling`` causes test failures, it likely indicates
-        an order dependency between some of your tests. Here are the most frequent
-        sources of state leakage we have encountered:
-        
-        * Locale activation, which is maintained in a threadlocal variable. Be sure to
-          reset your locale selection between tests.
-        * memcached contents. Be sure to flush between tests. Many test superclasses do
-          this automatically.
-        
-        It's also possible that you have ``post_save`` signal handlers which create
-        additional database rows while loading the fixtures. ``FastFixtureTestCase``
-        isn't yet smart enough to notice this and clean up after it, so you'll have to
-        go back to plain old ``TestCase`` for now.
-        
-        Exempting A Class From Bundling
-        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-        
-        In some unusual cases, it is desirable to exempt a test class from fixture
-        bundling, forcing it to set up and tear down its fixtures at the class
-        boundaries. For example, we might have a ``TestCase`` subclass which sets up
-        some state outside the DB in ``setUpClass`` and tears it down in
-        ``tearDownClass``, and it might not be possible to adapt those routines to heed
-        the advice of the fixture bundler. In such a case, simply set the
-        ``exempt_from_fixture_bundling`` attribute of the test class to ``True``.
-        
-        
-        Speedy Hygienic TransactionTestCases
-        ------------------------------------
-        
-        Unlike the stock Django test runner, django-nose lets you write custom
-        TransactionTestCase subclasses which expect to start with an unmarred DB,
-        saving an entire DB flush per test.
-        
-        Background
-        ~~~~~~~~~~
-        
-        The default Django TransactionTestCase class `can leave the DB in an unclean
-        state`_ when it's done. To compensate, TransactionTestCase does a
-        time-consuming flush of the DB *before* each test to ensure it begins with a
-        clean slate. Django's stock test runner then runs TransactionTestCases last so
-        they don't wreck the environment for better-behaved tests. django-nose
-        replicates this behavior.
-        
-        Escaping the Grime
-        ~~~~~~~~~~~~~~~~~~
-        
-        Some people, however, have made subclasses of TransactionTestCase that clean up
-        after themselves (and can do so efficiently, since they know what they've
-        changed). Like TestCase, these may assume they start with a clean DB. However,
-        any TransactionTestCases that run before them and leave a mess could cause them
-        to fail spuriously.
-        
-        django-nose offers to fix this. If you include a special attribute on your
-        well-behaved TransactionTestCase... ::
-        
-            class MyNiceTestCase(TransactionTestCase):
-                cleans_up_after_itself = True
-        
-        ...django-nose will run it before any of those nasty, trash-spewing test cases.
-        You can thus enjoy a big speed boost any time you make a TransactionTestCase
-        clean up after itself: skipping a whole DB flush before every test. With a
-        large schema, this can save minutes of IO.
-        
-        django-nose's own FastFixtureTestCase uses this feature, even though it
-        ultimately acts more like a TestCase than a TransactionTestCase.
-        
-        .. _can leave the DB in an unclean state: https://docs.djangoproject.com/en/1.4/topics/testing/#django.test.TransactionTestCase
-        
-        
-        Test-Only Models
-        ----------------
-        
-        If you have a model that is used only by tests (for example, to test an
-        abstract model base class), you can put it in any file that's imported in the
-        course of loading tests. For example, if the tests that need it are in
-        ``test_models.py``, you can put the model in there, too. django-nose will make
-        sure its DB table gets created.
-        
-        
-        Assertions
-        ----------
-        
-        ``django-nose.tools`` provides pep8 versions of Django's TestCase asserts
-        and some of its own as functions. ::
-        
-           assert_redirects(response, expected_url, status_code=302, target_status_code=200, host=None, msg_prefix='')
-        
-           assert_contains(response, text, count=None, status_code=200, msg_prefix='')
-           assert_not_contains(response, text, count=None, status_code=200, msg_prefix='')
-        
-           assert_form_error(response, form, field, errors, msg_prefix='')
-        
-           assert_template_used(response, template_name, msg_prefix='')
-           assert_template_not_used(response, template_name, msg_prefix='')
-        
-           assert_queryset_equal(qs, values, transform=repr)
-        
-           assert_num_queries(num, func=None, *args, **kwargs)
-        
-           assert_code(response, status_code, msg_prefix='')
-        
-           assert_ok(response, msg_prefix='')
-        
-           assert_mail_count(count, msg=None)
-        
-        
-        Using With South
-        ----------------
-        
-        `South`_ installs its own test command that turns off migrations during
-        testing. Make sure that django-nose comes *after* ``south`` in
-        ``INSTALLED_APPS`` so that django_nose's test command is used.
-        
-        .. _South: http://south.aeracode.org/
-        
-        
-        Always Passing The Same Options
-        -------------------------------
-        
-        To always set the same command line options you can use a `nose.cfg or
-        setup.cfg`_ (as usual) or you can specify them in settings.py like this::
-        
-            NOSE_ARGS = ['--failed', '--stop']
-        
-        .. _nose.cfg or setup.cfg: http://somethingaboutorange.com/mrl/projects/nose/0.11.2/usage.html#configuration
-        
-        
-        Custom Plugins
-        --------------
-        
-        If you need to `make custom plugins`_, you can define each plugin class
-        somewhere within your app and load them from settings.py like this::
-        
-            NOSE_PLUGINS = [
-                'yourapp.tests.plugins.SystematicDysfunctioner',
-                # ...
-            ]
-        
-        Just like middleware or anything else, each string must be a dot-separated,
-        importable path to an actual class. Each plugin class will be instantiated and
-        added to the Nose test runner.
-        
-        .. _make custom plugins: http://somethingaboutorange.com/mrl/projects/nose/0.11.2/plugins.html#writing-plugins
-        
-        
-        Older Versions of Django
-        ------------------------
-        Upgrading from Django <= 1.3 to Django 1.4
-        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-        In versions of Django < 1.4 the project folder was in fact a python package as
-        well (note the __init__.py in your project root). In Django 1.4, there is no
-        such file and thus the project is not a python module.
-        
-        **When you upgrade your Django project to the Django 1.4 layout, you need to
-        remove the __init__.py file in the root of your project (and move any python
-        files that reside there other than the manage.py) otherwise you will get a
-        `ImportError: No module named urls` exception.**
-        
-        This happens because Nose will intelligently try to populate your sys.path, and
-        in this particular case includes your parent directory if your project has a
-        __init__.py file (see: https://github.com/nose-devs/nose/blob/release_1.1.2/nose/importer.py#L134).
-        
-        This means that even though you have set up your directory structure properly and
-        set your `ROOT_URLCONF='my_project.urls'` to match the new structure, when running
-        django-nose's test runner it will try to find your urls.py file in `'my_project.my_project.urls'`.
-        
-        
-        Upgrading from Django < 1.2
-        ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-        
-        Django 1.2 switches to a `class-based test runner`_. To use django-nose
-        with Django 1.2, change your ``TEST_RUNNER`` from ``django_nose.run_tests`` to
-        ``django_nose.NoseTestSuiteRunner``.
-        
-        ``django_nose.run_tests`` will continue to work in Django 1.2 but will raise a
-        warning. In Django 1.3, it will stop working.
-        
-        If you were using ``django_nose.run_gis_tests``, you should also switch to
-        ``django_nose.NoseTestSuiteRunner`` and use one of the `spatial backends`_ in
-        your ``DATABASES`` settings.
-        
-        .. _class-based test runner: http://docs.djangoproject.com/en/dev/releases/1.2/#function-based-test-runners
-        .. _spatial backends: http://docs.djangoproject.com/en/dev/ref/contrib/gis/db-api/#id1
-        
-        Django 1.1
-        ~~~~~~~~~~
-        
-        If you want to use django-nose with Django 1.1, use
-        https://github.com/django-nose/django-nose/tree/django-1.1 or
-        http://pypi.python.org/pypi/django-nose/0.0.3.
-        
-        Django 1.0
-        ~~~~~~~~~~
-        
-        django-nose does not support Django 1.0.
-        
-        
-        Recent Version History
-        ----------------------
-        
-        1.3 (2014-12-05)
-          * Django 1.6 and 1.7 support (conrado, co3k, Nepherhotep, mbertheau)
-          * Python 3.3 and 3.4 testing and support (frewsxcv, jsocol)
-        
-        1.2 (2013-07-23)
-          * Python 3 support (melinath and jonashaag)
-          * Django 1.5 compat (fabiosantoscode)
-        
-        1.1 (2012-05-19)
-          * Django TransactionTestCases don't clean up after themselves; they leave
-            junk in the DB and clean it up only on ``_pre_setup``. Thus, Django makes
-            sure these tests run last. Now django-nose does, too. This means one fewer
-            source of failures on existing projects. (Erik Rose)
-          * Add support for hygienic TransactionTestCases. (Erik Rose)
-          * Support models that are used only for tests. Just put them in any file
-            imported in the course of loading tests. No more crazy hacks necessary.
-            (Erik Rose)
-          * Make the fixture bundler more conservative, fixing some conceivable
-            situations in which fixtures would not appear as intended if a
-            TransactionTestCase found its way into the middle of a bundle. (Erik Rose)
-          * Fix an error that would surface when using SQLAlchemy with connection
-            pooling. (Roger Hu)
-          * Gracefully ignore the new ``--liveserver`` option introduced in Django 1.4;
-            don't let it through to nose. (Adam DePue)
-        
-        1.0 (2012-03-12)
-          * New fixture-bundling plugin for avoiding needless fixture setup (Erik Rose)
-          * Moved FastFixtureTestCase in from test-utils, so now all the
-            fixture-bundling stuff is in one library. (Erik Rose)
-          * Added the REUSE_DB setting for faster startup and shutdown. (Erik Rose)
-          * Fixed a crash when printing options with certain verbosities. (Daniel Abel)
-          * Broke hard dependency on MySQL. Support PostgreSQL. (Roger Hu)
-          * Support SQLite, both memory- and disk-based. (Roger Hu and Erik Rose)
-          * Nail down versions of the package requirements. (Daniel Mizyrycki)
-        
-        0.1.3 (2010-04-15)
-          * Even better coverage support (rozza)
-          * README fixes (carljm and ionelmc)
-          * optparse OptionGroups are handled better (outofculture)
-          * nose plugins are loaded before listing options
-        
-        See more in changelog.txt.
-        
-Platform: UNKNOWN
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Environment :: Web Environment
-Classifier: Framework :: Django
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: BSD License
-Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.6
-Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.3
-Classifier: Programming Language :: Python :: 3.4
-Classifier: Topic :: Software Development :: Testing

+ 0 - 28
desktop/core/ext-py/django-nose-1.3/changelog.txt

@@ -1,28 +0,0 @@
-(Later entries are in the readme.)
-
-- 0.1.2 (08-14-10)
-  * run_tests API support (carjm)
-  * better coverage numbers (rozza & miracle2k)
-  * support for adding custom nose plugins (kumar303)
-
-- 0.1.1 (06-01-10)
-  * Cleaner installation (Michael Fladischer)
-
-- 0.1 (05-18-10)
-  * Class-based test runner (Antti Kaihola)
-  * Django 1.2 compatibility (Antti Kaihola)
-  * Mapping Django verbosity to nose verbosity
-
-- 0.0.3 (12-31-09)
-
-  * Python 2.4 support (Blake Winton)
-  * GeoDjango spatial database support (Peter Baumgartner)
-  * Return the number of failing tests on the command line
-
-- 0.0.2 (10-01-09)
-
-  * rst readme (Rob Madole)
-
-- 0.0.1 (10-01-09)
-
-  * birth!

+ 0 - 9
desktop/core/ext-py/django-nose-1.3/django_nose/__init__.py

@@ -1,9 +0,0 @@
-VERSION = (1, 3, 0)
-__version__ = '.'.join(map(str, VERSION))
-
-from django_nose.runner import *
-from django_nose.testcases import *
-
-
-# Django < 1.2 compatibility.
-run_tests = run_gis_tests = NoseTestSuiteRunner

+ 0 - 0
desktop/core/ext-py/django-nose-1.3/django_nose/management/commands/__init__.py


+ 0 - 33
desktop/core/ext-py/django-nose-1.3/django_nose/management/commands/test.py

@@ -1,33 +0,0 @@
-"""
-Add extra options from the test runner to the ``test`` command, so that you can
-browse all the nose options from the command line.
-"""
-from django.conf import settings
-from django.test.utils import get_runner
-
-
-if 'south' in settings.INSTALLED_APPS:
-    from south.management.commands.test import Command
-else:
-    from django.core.management.commands.test import Command
-
-
-# Django < 1.2 compatibility
-test_runner = settings.TEST_RUNNER
-if test_runner.endswith('run_tests') or test_runner.endswith('run_gis_tests'):
-    import warnings
-    warnings.warn(
-        'Use `django_nose.NoseTestSuiteRunner` instead of `%s`' % test_runner,
-        DeprecationWarning)
-
-
-TestRunner = get_runner(settings)
-
-if hasattr(TestRunner, 'options'):
-    extra_options = TestRunner.options
-else:
-    extra_options = []
-
-
-class Command(Command):
-    option_list = Command.option_list + tuple(extra_options)

+ 0 - 74
desktop/core/ext-py/django-nose-1.3/django_nose/tools.py

@@ -1,74 +0,0 @@
-# vim: tabstop=4 expandtab autoindent shiftwidth=4 fileencoding=utf-8
-
-"""
-Provides Nose and Django test case assert functions
-"""
-
-from django.test.testcases import TransactionTestCase
-
-from django.core import mail
-
-import re
-
-## Python
-
-from nose import tools
-for t in dir(tools):
-    if t.startswith('assert_'):
-        vars()[t] = getattr(tools, t)
-
-## Django
-
-caps = re.compile('([A-Z])')
-
-def pep8(name):
-    return caps.sub(lambda m: '_' + m.groups()[0].lower(), name)
-
-
-class Dummy(TransactionTestCase):
-    def nop():
-        pass
-_t = Dummy('nop')
-
-for at in [ at for at in dir(_t)
-            if at.startswith('assert') and not '_' in at ]:
-    pepd = pep8(at)
-    vars()[pepd] = getattr(_t, at)
-
-del Dummy
-del _t
-del pep8
-
-## New
-
-def assert_code(response, status_code, msg_prefix=''):
-    """Asserts the response was returned with the given status code
-    """
-
-    if msg_prefix:
-        msg_prefix = '%s: ' % msg_prefix
-
-    assert response.status_code == status_code, \
-        'Response code was %d (expected %d)' % \
-            (response.status_code, status_code)
-
-def assert_ok(response, msg_prefix=''):
-    """Asserts the response was returned with status 200 (OK)
-    """
-
-    return assert_code(response, 200, msg_prefix=msg_prefix)
-
-def assert_mail_count(count, msg=None):
-    """Assert the number of emails sent.
-    The message here tends to be long, so allow for replacing the whole
-    thing instead of prefixing.
-    """
-
-    if msg is None:
-        msg = ', '.join([e.subject for e in mail.outbox])
-        msg = '%d != %d %s' % (len(mail.outbox), count, msg)
-    assert_equals(len(mail.outbox), count, msg)
-
-# EOF
-
-

+ 0 - 54
desktop/core/ext-py/django-nose-1.3/runtests.sh

@@ -1,54 +0,0 @@
-#!/bin/bash
-
-export PYTHONPATH=.
-
-PYTHONVERSION=$(python --version 2>&1)
-PYTHONVERSION=${PYTHONVERSION##Python }
-
-function version { echo $@ | gawk -F. '{ printf("%d.%d.%d\n", $1,$2,$3); }'; }
-
-django_test() {
-    TEST="$1"
-    OUTPUT=$($TEST 2>&1)
-    if [ $? -gt 0 ]
-    then
-        echo FAIL: $3
-        $TEST
-        exit 1;
-    fi
-    echo $OUTPUT | grep "Ran $2 test" > /dev/null
-    if [ $? -gt 0 ]
-    then
-        echo FAIL: $3
-        $TEST
-        exit 1;
-    else
-        echo PASS: $3
-    fi
-
-    # Check that we're hijacking the help correctly.
-    $TEST --help 2>&1 | grep 'NOSE_DETAILED_ERRORS' > /dev/null
-    if [ $? -gt 0 ]
-    then
-        echo FAIL: $3 '(--help)'
-        exit 1;
-    else
-        echo PASS: $3 '(--help)'
-    fi
-}
-
-django_test 'django-admin.py test --settings=testapp.settings' '2' 'normal settings'
-if [ "$DJANGO" = "Django==1.4.1" -o "$DJANGO" = "Django==1.5" -o "$DJANGO" = "Django==1.6" ]
-then
-    django_test 'django-admin.py test --settings=testapp.settings_with_south' '2' 'with south in installed apps'
-fi
-
-django_test 'django-admin.py test --settings=testapp.settings_old_style' '2' 'django_nose.run_tests format'
-django_test 'testapp/runtests.py testapp.test_only_this' '1' 'via run_tests API'
-django_test 'django-admin.py test --settings=testapp.settings_with_plugins testapp/plugin_t' '1' 'with plugins'
-django_test 'django-admin.py test --settings=testapp.settings unittests' '4' 'unittests'
-if ! [ $(version $PYTHONVERSION) \> $(version 3.0.0) ]
-then
-# Python 3 doesn't support the hotshot profiler. See nose#842.
-django_test 'django-admin.py test --settings=testapp.settings --with-profile' '2' 'with profile plugin'
-fi

+ 0 - 5
desktop/core/ext-py/django-nose-1.3/setup.cfg

@@ -1,5 +0,0 @@
-[egg_info]
-tag_build = 
-tag_date = 0
-tag_svn_revision = 0
-

+ 0 - 0
desktop/core/ext-py/django-nose-1.3/testapp/__init__.py


+ 0 - 16
desktop/core/ext-py/django-nose-1.3/testapp/settings.py

@@ -1,16 +0,0 @@
-DATABASES = {
-    'default': {
-        'NAME': 'django_master',
-        'ENGINE': 'django.db.backends.sqlite3',
-    }
-}
-
-MIDDLEWARE_CLASSES = ()
-
-INSTALLED_APPS = (
-    'django_nose',
-)
-
-TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
-
-SECRET_KEY = 'ssshhhh'

+ 0 - 15
desktop/core/ext-py/django-nose-1.3/testapp/settings_old_style.py

@@ -1,15 +0,0 @@
-DATABASES = {
-    'default': {
-        'NAME': 'django_master',
-        'ENGINE': 'django.db.backends.sqlite3',
-    }
-}
-
-INSTALLED_APPS = (
-    'django_nose',
-)
-
-TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
-TEST_RUNNER = 'django_nose.run_tests'
-
-SECRET_KEY = 'sssshhh'

+ 0 - 6
desktop/core/ext-py/django-nose-1.3/testapp/settings_with_plugins.py

@@ -1,6 +0,0 @@
-from .settings import *
-
-
-NOSE_PLUGINS = [
-    'testapp.plugins.SanityCheckPlugin'
-]

+ 0 - 4
desktop/core/ext-py/django-nose-1.3/testapp/settings_with_south.py

@@ -1,4 +0,0 @@
-from .settings import *
-
-
-INSTALLED_APPS = ('south',) + INSTALLED_APPS

+ 61 - 0
desktop/core/ext-py/django-nose-1.4.5/AUTHORS.rst

@@ -0,0 +1,61 @@
+=======
+Credits
+=======
+
+**django-nose** was created by Jeff Balogh in 2009, which is a really long time
+ago in the Django world.  It keeps running because of the contributions of
+volunteers.  Thank you to everyone who uses django-nose, keeps your projects
+up-to-date, files detailed bugs, and submits patches.
+
+Maintainers
+-----------
+* Jeff Balogh (`jbalogh <https://github.com/jbalogh>`_)
+* Erik Rose (`erikrose <https://github.com/erikrose>`_)
+* James Socol (`jscol <https://github.com/jsocol>`_)
+* Rob Hudson (`robhudson <https://github.com/robhudson>`_)
+* John Whitlock (`jwhitlock <https://github.com/jwhitlock>`_)
+
+Contributors
+------------
+These non-maintainers have contributed code to a django-nose release:
+
+* Adam DePue (`adepue <https://github.com/adepue>`_)
+* Alexey Evseev (`st4lk <https://github.com/st4lk>`_)
+* Alex (`alexjg <https://github.com/alexjg>`_)
+* Antti Kaihola (`akaihola <https://github.com/akaihola>`_)
+* Ash Christopher (`ashchristopher <https://github.com/ashchristopher>`_)
+* Blake Winton (`bwinton <https://github.com/bwinton>`_)
+* Brad Pitcher (`brad <https://github.com/brad>`_)
+* Camilo Nova (`camilonova <https://github.com/camilonova>`_)
+* Carl Meyer (`carljm <https://github.com/carljm>`_)
+* Conrado Buhrer (`conrado <https://github.com/conrado>`_)
+* David Baumgold (`singingwolfboy <https://github.com/singingwolfboy>`_)
+* David Cramer (`dcramer <https://github.com/dcramer>`_)
+* Dmitry Gladkov (`dgladkov <https://github.com/dgladkov>`_)
+* Ederson Mota (`edrmp <https://github.com/edrmp>`_)
+* Eric Zarowny (`ezarowny <https://github.com/ezarowny>`_)
+* Eron Villarreal (`eroninjapan <https://github.com/eroninjapan>`_)
+* Fred Wenzel (`fwenzel <https://github.com/fwenzel>`_)
+* Fábio Santos (`fabiosantoscode <https://github.com/fabiosantoscode>`_)
+* Ionel Cristian Mărieș (`ionelmc <https://github.com/ionelmc>`_)
+* Jeremy Satterfield (`jsatt <https://github.com/jsatt>`_)
+* Johan Euphrosine (`proppy <https://github.com/proppy>`_)
+* Kyle Robertson (`dvelyk <https://github.com/dvelyk>`_)
+* Marius Gedminas (`mgedmin <https://github.com/mgedmin>`_)
+* Martin Chase (`outofculture <https://github.com/outofculture>`_)
+* Matthias Bauer (`moeffju <https://github.com/moeffju>`_)
+* Michael Elsdörfer (`miracle2k <https://github.com/miracle2k>`_)
+* Michael Kelly (`Osmose <https://github.com/Osmose>`_)
+* Peter Baumgartner (`ipmb <https://github.com/ipmb>`_)
+* Radek Simko (`radeksimko <https://github.com/radeksimko>`_)
+* Ramiro Morales (`ramiro <https://github.com/ramiro>`_)
+* Rob Madole (`robmadole <https://github.com/robmadole>`_)
+* Roger Hu (`rogerhu <https://github.com/rogerhu>`_)
+* Ross Lawley (`rozza <https://github.com/rozza>`_)
+* Scott Sexton (`scottsexton <https://github.com/scottsexton>`_)
+* Stephen Burrows (`melinath <https://github.com/melinath>`_)
+* Sverre Johansen (`sverrejoh <https://github.com/sverrejoh>`_)
+* Tim Child (`timc3 <https://github.com/timc3>`_)
+* Walter Doekes (`wdoekes <https://github.com/wdoekes>`_)
+* Will Kahn-Greene (`willkg <https://github.com/willkg>`_)
+* Yegor Roganov (`roganov <https://github.com/roganov>`_)

+ 137 - 0
desktop/core/ext-py/django-nose-1.4.5/CONTRIBUTING.rst

@@ -0,0 +1,137 @@
+============
+Contributing
+============
+
+Contributions are welcome, and they are greatly appreciated! Every
+little bit helps, and credit will always be given.
+
+You can contribute in many ways:
+
+Types of Contributions
+----------------------
+
+Report Bugs
+~~~~~~~~~~~
+
+Report bugs at https://github.com/django-nose/django-nose/issues.
+
+If you are reporting a bug, please include:
+
+* The version of django, nose, and django-nose you are using, and any other
+  applicable packages (``pip freeze`` will show current versions)
+* Any details about your local setup that might be helpful in troubleshooting.
+* Detailed steps to reproduce the bug.
+
+When someone submits a pull request to fix your bug, please try it out and
+report if it worked for you.
+
+Fix Bugs
+~~~~~~~~
+
+Look through the GitHub issues for bugs. Anything untagged or tagged with "bug"
+is open to whoever wants to implement it.
+
+Implement Features
+~~~~~~~~~~~~~~~~~~
+
+Look through the GitHub issues for features. Anything untagged ot tagged with
+"feature" is open to whoever wants to implement it.
+
+django-nose is built on nose, which supports plugins.  Consider implementing
+your feature as a plugin, maintained by the community using that feature,
+rather than adding to the django-nose codebase.
+
+Write Documentation
+~~~~~~~~~~~~~~~~~~~
+
+django-nose could always use more documentation, whether as part of the
+official django-nose, as code comments, or even on the web in blog posts,
+articles, and such.
+
+Submit Feedback
+~~~~~~~~~~~~~~~
+
+The best way to send feedback is to file an issue at 
+https://github.com/django-nose/django-nose/issues.
+
+If you are proposing a feature:
+
+* Explain in detail how it would work.
+* Keep the scope as narrow as possible, to make it easier to implement.
+* Remember that this is a volunteer-driven project, and that contributions
+  are welcome :)
+
+Get Started!
+------------
+
+Ready to contribute? Here's how to set up django-nose
+for local development.
+
+1. Fork the `django-nose` repo on GitHub.
+2. Clone your fork locally::
+
+    $ git clone git@github.com:your_name_here/django-nose.git
+
+3. Install your local copy into a virtualenv. Assuming you have
+   virtualenvwrapper installed, this is how you set up your fork for local
+   development::
+
+    $ mkvirtualenv django-nose
+    $ cd django-nose/
+    $ pip install -r requirements.txt
+    $ ./manage.py migrate
+
+4. Create a branch for local development::
+
+    $ git checkout -b name-of-your-bugfix-or-feature
+
+   Now you can make your changes locally.
+
+5. Make sure existing tests continue to pass with your new code::
+
+   $ make qa
+
+6. When you're done making changes, check that your changes pass flake8 and the
+   tests, including testing other Python versions with tox::
+
+    $ make qa-all
+
+6. Commit your changes and push your branch to GitHub::
+
+    $ git add .
+    $ git commit -m "Your detailed description of your changes."
+    $ git push origin name-of-your-bugfix-or-feature
+
+7. Submit a pull request through the GitHub website.
+
+Pull Request Guidelines
+-----------------------
+
+Before you submit a pull request, check that it meets these guidelines:
+
+1. The pull request should be in a branch.
+2. The pull request should include tests.
+3. You agree to license your contribution under the BSD license.
+4. If the pull request adds functionality, the docs should be updated.
+5. Make liberal use of `git rebase` to ensure clean commits on top of master.
+6. The pull request should pass QA tests and work for supported Python / Django
+   combinations.  Check
+   https://travis-ci.org/django-nose/django-nose/pull_requests
+   and make sure that the tests pass for all supported Python versions.
+
+Tips
+----
+
+The django-nose testapp uses django-nose, so all of the features are available.
+To run a subset of tests::
+
+    $ ./manage.py test testapp/tests.py
+
+To mark failed tests::
+
+    $ ./manage.py test --failed
+
+To re-run only the failed tests::
+
+    $ ./manage.py test --failed
+

+ 0 - 0
desktop/core/ext-py/django-nose-1.3/LICENSE → desktop/core/ext-py/django-nose-1.4.5/LICENSE


+ 20 - 0
desktop/core/ext-py/django-nose-1.4.5/MANIFEST.in

@@ -0,0 +1,20 @@
+include AUTHORS.rst
+include CONTRIBUTING.rst
+include LICENSE
+include Makefile
+include README.rst
+include changelog.rst
+include contribute.json
+include manage.py
+include requirements.txt
+include requirements-rtd.txt
+include runtests.sh
+
+recursive-include docs Makefile conf.py *.rst make.bat .keep
+recursive-include django_nose *.py
+recursive-include testapp *.py
+recursive-include testapp/fixtures *.json
+recursive-include unittests *.py
+
+recursive-exclude * *.py[co]
+recursive-exclude * __pycache__

+ 76 - 0
desktop/core/ext-py/django-nose-1.4.5/Makefile

@@ -0,0 +1,76 @@
+.PHONY: clean clean-build clean-pyc clean-test docs qa lint coverage jslint qa-all install-jslint test test-all coverage-console release sdist
+
+help:
+	@echo "clean - remove all artifacts"
+	@echo "clean-build - remove build artifacts"
+	@echo "clean-pyc - remove Python file artifacts"
+	@echo "clean-test - remove test and coverage artifacts"
+	@echo "coverage - check code coverage quickly with the default Python"
+	@echo "docs - generate Sphinx HTML documentation"
+	@echo "lint - check style with flake8"
+	@echo "qa - run linters and test coverage"
+	@echo "qa-all - run QA plus tox and packaging"
+	@echo "release - package and upload a release"
+	@echo "sdist - package"
+	@echo "test - run tests quickly with the default Python"
+	@echo "test-all - run tests on every Python version with tox"
+	@echo "test-release - upload a release to the PyPI test server"
+
+clean: clean-build clean-pyc clean-test
+
+qa: lint coverage
+
+qa-all: qa sdist test-all
+
+clean-build:
+	rm -fr build/
+	rm -fr dist/
+	rm -fr *.egg-info
+
+clean-pyc:
+	find . \( -name \*.pyc -o -name \*.pyo -o -name __pycache__ \) -delete
+	find . -name '*~' -delete
+
+clean-test:
+	rm -fr .tox/
+	rm -f .coverage
+	rm -fr htmlcov/
+
+docs:
+	$(MAKE) -C docs clean
+	$(MAKE) -C docs html
+	open docs/_build/html/index.html
+
+lint:
+	flake8 .
+
+test:
+	./manage.py test
+
+test-all:
+	COVERAGE=1 tox --skip-missing-interpreters
+
+coverage-console:
+	coverage erase
+	COVERAGE=1 ./runtests.sh
+	coverage combine
+	coverage report -m
+
+coverage: coverage-console
+	coverage html
+	open htmlcov/index.html
+
+release: sdist
+	twine upload dist/*
+	python -m webbrowser -n https://pypi.python.org/pypi/django-nose
+
+# Add [test] section to ~/.pypirc, https://test.pypi.org/legacy/
+test-release: sdist
+	twine upload --repository test dist/*
+	python -m webbrowser -n https://testpypi.python.org/pypi/django-nose
+
+sdist: clean
+	python setup.py sdist bdist_wheel
+	ls -l dist
+	check-manifest
+	pyroma dist/`ls -t dist | grep tar.gz | head -n1`

+ 160 - 0
desktop/core/ext-py/django-nose-1.4.5/PKG-INFO

@@ -0,0 +1,160 @@
+Metadata-Version: 1.1
+Name: django-nose
+Version: 1.4.5
+Summary: Makes your Django tests simple and snappy
+Home-page: http://github.com/django-nose/django-nose
+Author: Erik Rose
+Author-email: erikrose@grinchcentral.com
+License: BSD
+Description: 
+        ===========
+        django-nose
+        ===========
+        
+        
+        **django-nose** provides all the goodness of `nose`_ in your Django tests, like:
+        
+          * Testing just your apps by default, not all the standard ones that happen to
+            be in ``INSTALLED_APPS``
+          * Running the tests in one or more specific modules (or apps, or classes, or
+            folders, or just running a specific test)
+          * Obviating the need to import all your tests into ``tests/__init__.py``.
+            This not only saves busy-work but also eliminates the possibility of
+            accidentally shadowing test classes.
+          * Taking advantage of all the useful `nose plugins`_
+        
+        .. _nose: https://nose.readthedocs.io/en/latest/
+        .. _nose plugins: http://nose-plugins.jottit.com/
+        
+        It also provides:
+        
+          * Fixture bundling, an optional feature which speeds up your fixture-based
+            tests by a factor of 4
+          * Reuse of previously created test DBs, cutting 10 seconds off startup time
+          * Hygienic TransactionTestCases, which can save you a DB flush per test
+          * Support for various databases. Tested with MySQL, PostgreSQL, and SQLite.
+            Others should work as well.
+        
+        django-nose requires nose 1.2.1 or later, and the `latest release`_ is
+        recommended.  It follows the `Django's support policy`_, supporting:
+        
+          * Django 1.8 (LTS) with Python 2.7, 3.4, or 3.5
+          * Django 1.9 with Python 2.7, 3.4, or 3.5
+          * Django 1.10 with Python 2.7, 3.4, or 3.5
+          * Django 1.11 (LTS) with Python 2.7, 3.4, 3.5, or 3.6
+        
+        .. _latest release: https://pypi.python.org/pypi/nose
+        .. _Django's support policy: https://docs.djangoproject.com/en/1.8/internals/release-process/#supported-versions
+        
+        Development
+        -----------
+        :Code:   https://github.com/django-nose/django-nose
+        :Issues: https://github.com/django-nose/django-nose/issues?state=open
+        :Docs:   https://django-nose.readthedocs.io
+        
+        
+        Changelog
+        ---------
+        
+        1.4.5 (2017-08-22)
+        ~~~~~~~~~~~~~~~~~~
+        * Add Django 1.11 support
+        
+        1.4.4 (2016-06-27)
+        ~~~~~~~~~~~~~~~~~~
+        * Add Django 1.10 support
+        * Drop Django 1.4 - 1.7, and Python 2.6 support
+        * Drop South support
+        
+        1.4.3 (2015-12-28)
+        ~~~~~~~~~~~~~~~~~~
+        * Add Django 1.9 support
+        * Support long options without equals signs, such as "--attr selected"
+        * Support nose plugins using callback options
+        * Support nose options without default values (jsatt)
+        * Remove Django from install dependencies, to avoid accidental upgrades
+          (jsocol, willkg)
+        * Setting REUSE_DB to an empty value now disables REUSE_DB, instead of
+          enabling it (wdoekes)
+        
+        1.4.2 (2015-10-07)
+        ~~~~~~~~~~~~~~~~~~
+        * Warn against using REUSE_DB=1 and FastFixtureTestCase in docs
+        * REUSE_DB=1 uses new transaction management in Django 1.7, 1.8 (scottsexton)
+        * Try to avoid accidentally using production database with REUSE_DB=1 (alexjg, eroninjapan)
+        * Supported Django versions limited to current supported Django version 1.4,
+          1.7, and 1.8, as well as relevant Python versions.
+        
+        1.4.1 (2015-06-29)
+        ~~~~~~~~~~~~~~~~~~
+        * Fix version number (ezarowny)
+        * Fix choice options, unbreaking nose-cover (aamirtharaj-rpx, jwhitlock)
+        * Support 1.8 app loading system (dgladkov)
+        * Support non-ASCII file names (singingwolfboy)
+        * Better PEP8'd assertion names (roganov)
+        
+        1.4 (2015-04-23)
+        ~~~~~~~~~~~~~~~~
+        * Django 1.8 support (timc3, adepue, jwhitlock)
+        * Support --testrunner option (st4lk)
+        * Fix REUSE_DB second run in py3k (edrmp)
+        
+        1.3 (2014-12-05)
+        ~~~~~~~~~~~~~~~~
+        * Django 1.6 and 1.7 support (conrado, co3k, Nepherhotep, mbertheau)
+        * Python 3.3 and 3.4 testing and support (frewsxcv, jsocol)
+        
+        1.2 (2013-07-23)
+        ~~~~~~~~~~~~~~~~
+        * Python 3 support (melinath and jonashaag)
+        * Django 1.5 compat (fabiosantoscode)
+        
+        1.1 (2012-05-19)
+        ~~~~~~~~~~~~~~~~
+        * Django TransactionTestCases don't clean up after themselves; they leave
+          junk in the DB and clean it up only on ``_pre_setup``. Thus, Django makes
+          sure these tests run last. Now django-nose does, too. This means one fewer
+          source of failures on existing projects. (Erik Rose)
+        * Add support for hygienic TransactionTestCases. (Erik Rose)
+        * Support models that are used only for tests. Just put them in any file
+          imported in the course of loading tests. No more crazy hacks necessary.
+          (Erik Rose)
+        * Make the fixture bundler more conservative, fixing some conceivable
+          situations in which fixtures would not appear as intended if a
+          TransactionTestCase found its way into the middle of a bundle. (Erik Rose)
+        * Fix an error that would surface when using SQLAlchemy with connection
+          pooling. (Roger Hu)
+        * Gracefully ignore the new ``--liveserver`` option introduced in Django 1.4;
+          don't let it through to nose. (Adam DePue)
+        
+        1.0 (2012-03-12)
+        ~~~~~~~~~~~~~~~~
+        * New fixture-bundling plugin for avoiding needless fixture setup (Erik Rose)
+        * Moved FastFixtureTestCase in from test-utils, so now all the
+          fixture-bundling stuff is in one library. (Erik Rose)
+        * Added the REUSE_DB setting for faster startup and shutdown. (Erik Rose)
+        * Fixed a crash when printing options with certain verbosities. (Daniel Abel)
+        * Broke hard dependency on MySQL. Support PostgreSQL. (Roger Hu)
+        * Support SQLite, both memory- and disk-based. (Roger Hu and Erik Rose)
+        * Nail down versions of the package requirements. (Daniel Mizyrycki)
+        
+        
+        
+        _(Older changes can be found in the full documentation)._
+        
+Keywords: d,j,a,n,g,o, ,n,o,s,e, ,d,j,a,n,g,o,-,n,o,s,e
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Web Environment
+Classifier: Framework :: Django
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Topic :: Software Development :: Testing

+ 57 - 0
desktop/core/ext-py/django-nose-1.4.5/README.rst

@@ -0,0 +1,57 @@
+===========
+django-nose
+===========
+
+.. image:: https://img.shields.io/pypi/v/django-nose.svg
+    :alt: The PyPI package
+    :target: https://pypi.python.org/pypi/django-nose
+
+.. image:: https://img.shields.io/travis/django-nose/django-nose/master.svg
+    :alt: TravisCI Build Status
+    :target: https://travis-ci.org/django-nose/django-nose
+
+.. image:: https://img.shields.io/coveralls/django-nose/django-nose/master.svg
+    :alt: Coveralls Test Coverage
+    :target: https://coveralls.io/r/django-nose/django-nose?branch=master
+
+.. Omit badges from docs
+
+**django-nose** provides all the goodness of `nose`_ in your Django tests, like:
+
+  * Testing just your apps by default, not all the standard ones that happen to
+    be in ``INSTALLED_APPS``
+  * Running the tests in one or more specific modules (or apps, or classes, or
+    folders, or just running a specific test)
+  * Obviating the need to import all your tests into ``tests/__init__.py``.
+    This not only saves busy-work but also eliminates the possibility of
+    accidentally shadowing test classes.
+  * Taking advantage of all the useful `nose plugins`_
+
+.. _nose: https://nose.readthedocs.io/en/latest/
+.. _nose plugins: http://nose-plugins.jottit.com/
+
+It also provides:
+
+  * Fixture bundling, an optional feature which speeds up your fixture-based
+    tests by a factor of 4
+  * Reuse of previously created test DBs, cutting 10 seconds off startup time
+  * Hygienic TransactionTestCases, which can save you a DB flush per test
+  * Support for various databases. Tested with MySQL, PostgreSQL, and SQLite.
+    Others should work as well.
+
+django-nose requires nose 1.2.1 or later, and the `latest release`_ is
+recommended.  It follows the `Django's support policy`_, supporting:
+
+  * Django 1.8 (LTS) with Python 2.7, 3.4, or 3.5
+  * Django 1.9 with Python 2.7, 3.4, or 3.5
+  * Django 1.10 with Python 2.7, 3.4, or 3.5
+  * Django 1.11 (LTS) with Python 2.7, 3.4, 3.5, or 3.6
+
+.. _latest release: https://pypi.python.org/pypi/nose
+.. _Django's support policy: https://docs.djangoproject.com/en/1.8/internals/release-process/#supported-versions
+
+Development
+-----------
+:Code:   https://github.com/django-nose/django-nose
+:Issues: https://github.com/django-nose/django-nose/issues?state=open
+:Docs:   https://django-nose.readthedocs.io

+ 123 - 0
desktop/core/ext-py/django-nose-1.4.5/changelog.rst

@@ -0,0 +1,123 @@
+Changelog
+---------
+
+1.4.5 (2017-08-22)
+~~~~~~~~~~~~~~~~~~
+* Add Django 1.11 support
+
+1.4.4 (2016-06-27)
+~~~~~~~~~~~~~~~~~~
+* Add Django 1.10 support
+* Drop Django 1.4 - 1.7, and Python 2.6 support
+* Drop South support
+
+1.4.3 (2015-12-28)
+~~~~~~~~~~~~~~~~~~
+* Add Django 1.9 support
+* Support long options without equals signs, such as "--attr selected"
+* Support nose plugins using callback options
+* Support nose options without default values (jsatt)
+* Remove Django from install dependencies, to avoid accidental upgrades
+  (jsocol, willkg)
+* Setting REUSE_DB to an empty value now disables REUSE_DB, instead of
+  enabling it (wdoekes)
+
+1.4.2 (2015-10-07)
+~~~~~~~~~~~~~~~~~~
+* Warn against using REUSE_DB=1 and FastFixtureTestCase in docs
+* REUSE_DB=1 uses new transaction management in Django 1.7, 1.8 (scottsexton)
+* Try to avoid accidentally using production database with REUSE_DB=1 (alexjg, eroninjapan)
+* Supported Django versions limited to current supported Django version 1.4,
+  1.7, and 1.8, as well as relevant Python versions.
+
+1.4.1 (2015-06-29)
+~~~~~~~~~~~~~~~~~~
+* Fix version number (ezarowny)
+* Fix choice options, unbreaking nose-cover (aamirtharaj-rpx, jwhitlock)
+* Support 1.8 app loading system (dgladkov)
+* Support non-ASCII file names (singingwolfboy)
+* Better PEP8'd assertion names (roganov)
+
+1.4 (2015-04-23)
+~~~~~~~~~~~~~~~~
+* Django 1.8 support (timc3, adepue, jwhitlock)
+* Support --testrunner option (st4lk)
+* Fix REUSE_DB second run in py3k (edrmp)
+
+1.3 (2014-12-05)
+~~~~~~~~~~~~~~~~
+* Django 1.6 and 1.7 support (conrado, co3k, Nepherhotep, mbertheau)
+* Python 3.3 and 3.4 testing and support (frewsxcv, jsocol)
+
+1.2 (2013-07-23)
+~~~~~~~~~~~~~~~~
+* Python 3 support (melinath and jonashaag)
+* Django 1.5 compat (fabiosantoscode)
+
+1.1 (2012-05-19)
+~~~~~~~~~~~~~~~~
+* Django TransactionTestCases don't clean up after themselves; they leave
+  junk in the DB and clean it up only on ``_pre_setup``. Thus, Django makes
+  sure these tests run last. Now django-nose does, too. This means one fewer
+  source of failures on existing projects. (Erik Rose)
+* Add support for hygienic TransactionTestCases. (Erik Rose)
+* Support models that are used only for tests. Just put them in any file
+  imported in the course of loading tests. No more crazy hacks necessary.
+  (Erik Rose)
+* Make the fixture bundler more conservative, fixing some conceivable
+  situations in which fixtures would not appear as intended if a
+  TransactionTestCase found its way into the middle of a bundle. (Erik Rose)
+* Fix an error that would surface when using SQLAlchemy with connection
+  pooling. (Roger Hu)
+* Gracefully ignore the new ``--liveserver`` option introduced in Django 1.4;
+  don't let it through to nose. (Adam DePue)
+
+1.0 (2012-03-12)
+~~~~~~~~~~~~~~~~
+* New fixture-bundling plugin for avoiding needless fixture setup (Erik Rose)
+* Moved FastFixtureTestCase in from test-utils, so now all the
+  fixture-bundling stuff is in one library. (Erik Rose)
+* Added the REUSE_DB setting for faster startup and shutdown. (Erik Rose)
+* Fixed a crash when printing options with certain verbosities. (Daniel Abel)
+* Broke hard dependency on MySQL. Support PostgreSQL. (Roger Hu)
+* Support SQLite, both memory- and disk-based. (Roger Hu and Erik Rose)
+* Nail down versions of the package requirements. (Daniel Mizyrycki)
+
+.. Omit older changes from package
+
+0.1.3 (2010-04-15)
+~~~~~~~~~~~~~~~~~~
+* Even better coverage support (rozza)
+* README fixes (carljm and ionelmc)
+* optparse OptionGroups are handled better (outofculture)
+* nose plugins are loaded before listing options
+
+0.1.2 (2010-08-14)
+~~~~~~~~~~~~~~~~~~
+* run_tests API support (carjm)
+* better coverage numbers (rozza & miracle2k)
+* support for adding custom nose plugins (kumar303)
+
+0.1.1 (2010-06-01)
+~~~~~~~~~~~~~~~~~~
+* Cleaner installation (Michael Fladischer)
+
+0.1 (2010-05-18)
+~~~~~~~~~~~~~~~~
+* Class-based test runner (Antti Kaihola)
+* Django 1.2 compatibility (Antti Kaihola)
+* Mapping Django verbosity to nose verbosity
+
+0.0.3 (2009-12-31)
+~~~~~~~~~~~~~~~~~~
+* Python 2.4 support (Blake Winton)
+* GeoDjango spatial database support (Peter Baumgartner)
+* Return the number of failing tests on the command line
+
+0.0.2 (2009-10-01)
+~~~~~~~~~~~~~~~~~~
+* rst readme (Rob Madole)
+
+0.0.1 (2009-10-01)
+~~~~~~~~~~~~~~~~~~
+* birth!

+ 23 - 0
desktop/core/ext-py/django-nose-1.4.5/contribute.json

@@ -0,0 +1,23 @@
+{
+    "name": "django-nose",
+    "description": "Django test runner using nose.",
+    "repository": {
+        "url": "https://github.com/django-nose/django-nose",
+        "license": "BSD",
+        "tests": "https://travis-ci.org/django-nose/django-nose"
+    },
+    "participate": {
+        "home": "https://github.com/django-nose/django-nose",
+        "docs": "https://github.com/django-nose/django-nose"
+    },
+    "bugs": {
+        "list": "https://github.com/django-nose/django-nose/issues",
+        "report": "https://github.com/django-nose/django-nose/issues/new"
+    },
+    "keywords": [
+        "django",
+        "python",
+        "nose",
+        "testing"
+    ]
+}

+ 12 - 0
desktop/core/ext-py/django-nose-1.4.5/django_nose/__init__.py

@@ -0,0 +1,12 @@
+# coding: utf-8
+"""The django_nose module."""
+from __future__ import unicode_literals
+
+from django_nose.runner import BasicNoseRunner, NoseTestSuiteRunner
+from django_nose.testcases import FastFixtureTestCase
+assert BasicNoseRunner
+assert NoseTestSuiteRunner
+assert FastFixtureTestCase
+
+VERSION = (1, 4, 5)
+__version__ = '.'.join(map(str, VERSION))

+ 33 - 14
desktop/core/ext-py/django-nose-1.3/django_nose/fixture_tables.py → desktop/core/ext-py/django-nose-1.4.5/django_nose/fixture_tables.py

@@ -1,6 +1,9 @@
-"""A copy of Django 1.3.0's stock loaddata.py, adapted so that, instead of
+"""Unload fixtures by truncating tables rather than rebuilding.
+
+A copy of Django 1.3.0's stock loaddata.py, adapted so that, instead of
 loading any data, it returns the tables referenced by a set of fixtures so we
-can truncate them (and no others) quickly after we're finished with them."""
+can truncate them (and no others) quickly after we're finished with them.
+"""
 
 import os
 import gzip
@@ -10,7 +13,15 @@ from itertools import product
 from django.conf import settings
 from django.core import serializers
 from django.db import router, DEFAULT_DB_ALIAS
-from django.db.models import get_apps
+
+try:
+    from django.db.models import get_apps
+except ImportError:
+    from django.apps import apps
+
+    def get_apps():
+        """Emulate get_apps in Django 1.9 and later."""
+        return [a.models_module for a in apps.get_app_configs()]
 
 try:
     import bz2
@@ -20,9 +31,12 @@ except ImportError:
 
 
 def tables_used_by_fixtures(fixture_labels, using=DEFAULT_DB_ALIAS):
-    """Act like Django's stock loaddata command, but, instead of loading data,
+    """Get tables used by a fixture.
+
+    Acts like Django's stock loaddata command, but, instead of loading data,
     return an iterable of the names of the tables into which data would be
-    loaded."""
+    loaded.
+    """
     # Keep a count of the installed objects and fixtures
     fixture_count = 0
     loaded_object_count = 0
@@ -33,12 +47,14 @@ def tables_used_by_fixtures(fixture_labels, using=DEFAULT_DB_ALIAS):
         def __init__(self, *args, **kwargs):
             zipfile.ZipFile.__init__(self, *args, **kwargs)
             if settings.DEBUG:
-                assert len(self.namelist()) == 1, "Zip-compressed fixtures must contain only one file."
+                assert len(self.namelist()) == 1, \
+                    "Zip-compressed fixtures must contain only one file."
+
         def read(self):
             return zipfile.ZipFile.read(self, self.namelist()[0])
 
     compression_types = {
-        None:   file,
+        None:   open,
         'gz':   gzip.GzipFile,
         'zip':  SingleZipReader
     }
@@ -55,7 +71,9 @@ def tables_used_by_fixtures(fixture_labels, using=DEFAULT_DB_ALIAS):
             # It's a models.py module
             app_module_paths.append(app.__file__)
 
-    app_fixtures = [os.path.join(os.path.dirname(path), 'fixtures') for path in app_module_paths]
+    app_fixtures = [
+        os.path.join(os.path.dirname(path), 'fixtures')
+        for path in app_module_paths]
     for fixture_label in fixture_labels:
         parts = fixture_label.split('.')
 
@@ -118,13 +136,14 @@ def tables_used_by_fixtures(fixture_labels, using=DEFAULT_DB_ALIAS):
                         # stdout.write("Installing %s fixture '%s' from %s.\n"
                         # % (format, fixture_name, humanize(fixture_dir)))
                         try:
-                            objects = serializers.deserialize(format, fixture, using=using)
+                            objects = serializers.deserialize(
+                                format, fixture, using=using)
                             for obj in objects:
                                 objects_in_fixture += 1
-                                if router.allow_syncdb(using, obj.object.__class__):
+                                cls = obj.object.__class__
+                                if router.allow_syncdb(using, cls):
                                     loaded_objects_in_fixture += 1
-                                    tables.add(
-                                        obj.object.__class__._meta.db_table)
+                                    tables.add(cls._meta.db_table)
                             loaded_object_count += loaded_objects_in_fixture
                             fixture_object_count += objects_in_fixture
                             label_found = True
@@ -139,8 +158,8 @@ def tables_used_by_fixtures(fixture_labels, using=DEFAULT_DB_ALIAS):
                             return set()
                         fixture.close()
 
-                        # If the fixture we loaded contains 0 objects, assume that an
-                        # error was encountered during fixture loading.
+                        # If the fixture we loaded contains 0 objects, assume
+                        # that an error was encountered during fixture loading.
                         if objects_in_fixture == 0:
                             # stderr.write( style.ERROR("No fixture data found
                             # for '%s'. (File format may be invalid.)\n" %

+ 1 - 0
desktop/core/ext-py/django-nose-1.4.5/django_nose/management/__init__.py

@@ -0,0 +1 @@
+"""django-nose management additions."""

+ 1 - 0
desktop/core/ext-py/django-nose-1.4.5/django_nose/management/commands/__init__.py

@@ -0,0 +1 @@
+"""django-nose management commands."""

+ 25 - 0
desktop/core/ext-py/django-nose-1.4.5/django_nose/management/commands/test.py

@@ -0,0 +1,25 @@
+# coding: utf-8
+"""
+Add extra options from the test runner to the ``test`` command.
+
+This enables browsing all the nose options from the command line.
+"""
+from __future__ import unicode_literals
+
+from django.conf import settings
+from django.core.management.commands.test import Command
+from django.test.utils import get_runner
+
+
+TestRunner = get_runner(settings)
+
+if hasattr(TestRunner, 'options'):
+    extra_options = TestRunner.options
+else:
+    extra_options = []
+
+
+class Command(Command):
+    """Implement the ``test`` command."""
+
+    option_list = getattr(Command, 'option_list', ()) + tuple(extra_options)

+ 32 - 22
desktop/core/ext-py/django-nose-1.3/django_nose/plugin.py → desktop/core/ext-py/django-nose-1.4.5/django_nose/plugin.py

@@ -1,3 +1,7 @@
+# coding: utf-8
+"""Included django-nose plugins."""
+from __future__ import unicode_literals
+
 import sys
 
 from nose.plugins.base import Plugin
@@ -10,7 +14,7 @@ from django_nose.utils import process_tests, is_subclass_at_all
 
 
 class AlwaysOnPlugin(Plugin):
-    """A plugin that takes no options and is always enabled"""
+    """A base plugin that takes no options and is always enabled."""
 
     def options(self, parser, env):
         """Avoid adding a ``--with`` option for this plugin.
@@ -18,39 +22,41 @@ class AlwaysOnPlugin(Plugin):
         We don't have any options, and this plugin is always enabled, so we
         don't want to use superclass's ``options()`` method which would add a
         ``--with-*`` option.
-
         """
 
     def configure(self, *args, **kw_args):
+        """Configure and enable this plugin."""
         super(AlwaysOnPlugin, self).configure(*args, **kw_args)
-        self.enabled = True  # Force this plugin to be always enabled.
+        self.enabled = True
 
 
 class ResultPlugin(AlwaysOnPlugin):
-    """Captures the TestResult object for later inspection
+    """Captures the TestResult object for later inspection.
 
     nose doesn't return the full test result object from any of its runner
     methods.  Pass an instance of this plugin to the TestProgram and use
     ``result`` after running the tests to get the TestResult object.
-
     """
+
     name = 'result'
 
     def finalize(self, result):
+        """Finalize test run by capturing the result."""
         self.result = result
 
 
 class DjangoSetUpPlugin(AlwaysOnPlugin):
-    """Configures Django to set up and tear down the environment
+    """Configures Django to set up and tear down the environment.
 
     This allows coverage to report on all code imported and used during the
     initialization of the test runner.
-
     """
+
     name = 'django setup'
     score = 150
 
     def __init__(self, runner):
+        """Initialize the plugin with the test runner."""
         super(DjangoSetUpPlugin, self).__init__()
         self.runner = runner
         self.sys_stdout = sys.stdout
@@ -78,12 +84,16 @@ class DjangoSetUpPlugin(AlwaysOnPlugin):
         sys.stdout = sys_stdout
 
     def finalize(self, result):
+        """Finalize test run by cleaning up databases and environment."""
         self.runner.teardown_databases(self.old_names)
         self.runner.teardown_test_environment()
 
 
 class Bucketer(object):
+    """Collect tests into buckets with similar setup requirements."""
+
     def __init__(self):
+        """Initialize the test buckets."""
         # { (frozenset(['users.json']), True):
         #      [ContextSuite(...), ContextSuite(...)] }
         self.buckets = {}
@@ -93,8 +103,11 @@ class Bucketer(object):
         self.remainder = []
 
     def add(self, test):
-        """Put a test into a bucket according to its set of fixtures and the
-        value of its exempt_from_fixture_bundling attr."""
+        """Add test into an initialization bucket.
+
+        Tests are bucketed according to its set of fixtures and the
+        value of its exempt_from_fixture_bundling attr.
+        """
         if is_subclass_at_all(test.context, FastFixtureTestCase):
             # We bucket even FFTCs that don't have any fixtures, but it
             # shouldn't matter.
@@ -109,9 +122,11 @@ class Bucketer(object):
 
 class TestReorderer(AlwaysOnPlugin):
     """Reorder tests for various reasons."""
+
     name = 'django-nose-test-reorderer'
 
     def options(self, parser, env):
+        """Add --with-fixture-bundling to options."""
         super(TestReorderer, self).options(parser, env)  # pointless
         parser.add_option('--with-fixture-bundling',
                           action='store_true',
@@ -122,12 +137,12 @@ class TestReorderer(AlwaysOnPlugin):
                                '[NOSE_WITH_FIXTURE_BUNDLING]')
 
     def configure(self, options, conf):
+        """Configure plugin, reading the with_fixture_bundling option."""
         super(TestReorderer, self).configure(options, conf)
         self.should_bundle = options.with_fixture_bundling
 
     def _put_transaction_test_cases_last(self, test):
-        """Reorder tests in the suite so TransactionTestCase-based tests come
-        last.
+        """Reorder test suite so TransactionTestCase-based tests come last.
 
         Django has a weird design decision wherein TransactionTestCase doesn't
         clean up after itself. Instead, it resets the DB to a clean state only
@@ -140,12 +155,9 @@ class TestReorderer(AlwaysOnPlugin):
         after each unit test wouldn't necessarily clean up after doctests, so
         you'd have to clean on entry to a test anyway." was once uttered on
         #django-dev.
-
         """
-
         def filthiness(test):
-            """Return a comparand based on whether a test is guessed to clean
-            up after itself.
+            """Return a score of how messy a test leaves the environment.
 
             Django's TransactionTestCase doesn't clean up the DB on teardown,
             but it's hard to guess whether subclasses (other than TestCase) do.
@@ -173,7 +185,7 @@ class TestReorderer(AlwaysOnPlugin):
             test_class = test.context
             if (is_subclass_at_all(test_class, TestCase) or
                 (is_subclass_at_all(test_class, TransactionTestCase) and
-                  getattr(test_class, 'cleans_up_after_itself', False))):
+                 getattr(test_class, 'cleans_up_after_itself', False))):
                 return 1
             return 2
 
@@ -183,8 +195,7 @@ class TestReorderer(AlwaysOnPlugin):
         return ContextSuite(flattened)
 
     def _bundle_fixtures(self, test):
-        """Reorder the tests in the suite so classes using identical
-        sets of fixtures are contiguous.
+        """Reorder tests to minimize fixture loading.
 
         I reorder FastFixtureTestCases so ones using identical sets
         of fixtures run adjacently. I then put attributes on them
@@ -196,11 +207,9 @@ class TestReorderer(AlwaysOnPlugin):
         nobody else, in practice, pays attention to the ``_fb`` advisory
         bits. We return those first, then any remaining tests in the
         order they were received.
-
         """
         def suite_sorted_by_fixtures(suite):
-            """Flatten and sort a tree of Suites by the ``fixtures`` members of
-            their contexts.
+            """Flatten and sort a tree of Suites by fixture.
 
             Add ``_fb_should_setup_fixtures`` and
             ``_fb_should_teardown_fixtures`` attrs to each test class to advise
@@ -215,7 +224,8 @@ class TestReorderer(AlwaysOnPlugin):
             # Lay the bundles of common-fixture-having test classes end to end
             # in a single list so we can make a test suite out of them:
             flattened = []
-            for ((fixtures, is_exempt), fixture_bundle) in bucketer.buckets.items():
+            for (key, fixture_bundle) in bucketer.buckets.items():
+                fixtures, is_exempt = key
                 # Advise first and last test classes in each bundle to set up
                 # and tear down fixtures and the rest not to:
                 if fixtures and not is_exempt:

+ 218 - 127
desktop/core/ext-py/django-nose-1.3/django_nose/runner.py → desktop/core/ext-py/django-nose-1.4.5/django_nose/runner.py

@@ -1,3 +1,4 @@
+# coding: utf-8
 """Django test runner that invokes nose.
 
 You can use... ::
@@ -7,50 +8,28 @@ You can use... ::
 in settings.py for arguments that you want always passed to nose.
 
 """
-from __future__ import print_function
+from __future__ import print_function, unicode_literals
+
 import os
 import sys
-from optparse import make_option
+from importlib import import_module
+from optparse import NO_DEFAULT
 from types import MethodType
 
-import django
+from django import setup
+from django.apps import apps
 from django.conf import settings
 from django.core import exceptions
-from django.core.management.base import BaseCommand
 from django.core.management.color import no_style
 from django.core.management.commands.loaddata import Command
 from django.db import connections, transaction, DEFAULT_DB_ALIAS
-from django.db.backends.creation import BaseDatabaseCreation
-from django.utils.importlib import import_module
-
-try:
-    from django.apps import apps
-except ImportError:
-    # Django < 1.7
-    from django.db.models.loading import cache as apps
-
-import nose.core
+from django.test.runner import DiscoverRunner
 
 from django_nose.plugin import DjangoSetUpPlugin, ResultPlugin, TestReorderer
 from django_nose.utils import uses_mysql
+import nose.core
 
-try:
-    any
-except NameError:
-    def any(iterable):
-        for element in iterable:
-            if element:
-                return True
-        return False
-
-try:
-    from django.test.runner import DiscoverRunner
-except ImportError:
-    # Django < 1.8
-    from django.test.simple import DjangoTestSuiteRunner as DiscoverRunner
-
-
-__all__ = ['BasicNoseRunner', 'NoseTestSuiteRunner']
+__all__ = ('BasicNoseRunner', 'NoseTestSuiteRunner')
 
 
 # This is a table of Django's "manage.py test" options which
@@ -66,18 +45,6 @@ def translate_option(opt):
     return OPTION_TRANSLATION.get(opt, opt)
 
 
-# Django v1.2 does not have a _get_test_db_name() function.
-if not hasattr(BaseDatabaseCreation, '_get_test_db_name'):
-    def _get_test_db_name(self):
-        TEST_DATABASE_PREFIX = 'test_'
-
-        if self.connection.settings_dict['TEST_NAME']:
-            return self.connection.settings_dict['TEST_NAME']
-        return TEST_DATABASE_PREFIX + self.connection.settings_dict['NAME']
-
-    BaseDatabaseCreation._get_test_db_name = _get_test_db_name
-
-
 def _get_plugins_from_settings():
     plugins = (list(getattr(settings, 'NOSE_PLUGINS', [])) +
                ['django_nose.plugin.TestReorderer'])
@@ -86,67 +53,184 @@ def _get_plugins_from_settings():
             dot = plug_path.rindex('.')
         except ValueError:
             raise exceptions.ImproperlyConfigured(
-                    "%s isn't a Nose plugin module" % plug_path)
+                "%s isn't a Nose plugin module" % plug_path)
         p_mod, p_classname = plug_path[:dot], plug_path[dot + 1:]
 
         try:
             mod = import_module(p_mod)
         except ImportError as e:
             raise exceptions.ImproperlyConfigured(
-                    'Error importing Nose plugin module %s: "%s"' % (p_mod, e))
+                'Error importing Nose plugin module %s: "%s"' % (p_mod, e))
 
         try:
             p_class = getattr(mod, p_classname)
         except AttributeError:
             raise exceptions.ImproperlyConfigured(
-                    'Nose plugin module "%s" does not define a "%s"' %
-                    (p_mod, p_classname))
+                'Nose plugin module "%s" does not define a "%s"' %
+                (p_mod, p_classname))
 
         yield p_class()
 
 
-def _get_options():
-    """Return all nose options that don't conflict with django options."""
-    cfg_files = nose.core.all_config_files()
-    manager = nose.core.DefaultPluginManager()
-    config = nose.core.Config(env=os.environ, files=cfg_files, plugins=manager)
-    config.plugins.addPlugins(list(_get_plugins_from_settings()))
-    options = config.getParser()._get_all_options()
+class BaseRunner(DiscoverRunner):
+    """Runner that translates nose optparse arguments to argparse.
 
-    # copy nose's --verbosity option and rename to --nose-verbosity
-    verbosity = [o for o in options if o.get_opt_string() == '--verbosity'][0]
-    verbosity_attrs = dict((attr, getattr(verbosity, attr))
-                           for attr in verbosity.ATTRS
-                           if attr not in ('dest', 'metavar'))
-    options.append(make_option('--nose-verbosity',
-                               dest='nose_verbosity',
-                               metavar='NOSE_VERBOSITY',
-                               **verbosity_attrs))
-
-    # Django 1.6 introduces a "--pattern" option, which is shortened into "-p"
-    # do not allow "-p" to collide with nose's "--plugins" option.
-    plugins_option = [o for o in options if o.get_opt_string() == '--plugins'][0]
-    plugins_option._short_opts.remove('-p')
+    Django 1.8 and later uses argparse.ArgumentParser. Nose's optparse
+    arguments need to be translated to this format, so that the Django
+    command line parsing will pass. This parsing is (mostly) thrown out,
+    and reassembled into command line arguments for nose to reparse.
+    """
 
-    django_opts = [opt.dest for opt in BaseCommand.option_list] + ['version']
-    return tuple(o for o in options if o.dest not in django_opts and
-                                       o.action != 'help')
+    # Don't pass the following options to nosetests
+    django_opts = [
+        '--noinput', '--liveserver', '-p', '--pattern', '--testrunner',
+        '--settings',
+        # 1.8 arguments
+        '--keepdb', '--reverse', '--debug-sql',
+        # 1.9 arguments
+        '--parallel',
+        # 1.10 arguments
+        '--tag', '--exclude-tag',
+        # 1.11 arguments
+        '--debug-mode',
+    ]
+
+    #
+    # For optparse -> argparse conversion
+    #
+    # Option strings to remove from Django options if found
+    _argparse_remove_options = (
+        '-p',  # Short arg for nose's --plugins, not Django's --patterns
+        '-d',  # Short arg for nose's --detailed-errors, not Django's
+               #  --debug-sql
+    )
+
+    # Convert nose optparse options to argparse options
+    _argparse_type = {
+        'int': int,
+        'float': float,
+        'complex': complex,
+        'string': str,
+        'choice': str,
+    }
+    # If optparse has a None argument, omit from call to add_argument
+    _argparse_omit_if_none = (
+        'action', 'nargs', 'const', 'default', 'type', 'choices',
+        'required', 'help', 'metavar', 'dest')
+
+    # Always ignore these optparse arguments
+    # Django will parse without calling the callback
+    # nose will then reparse with the callback
+    _argparse_callback_options = (
+        'callback', 'callback_args', 'callback_kwargs')
+
+    # Keep track of nose options with nargs=1
+    _has_nargs = set(['--verbosity'])
+
+    @classmethod
+    def add_arguments(cls, parser):
+        """Convert nose's optparse arguments to argparse."""
+        super(BaseRunner, cls).add_arguments(parser)
+
+        # Read optparse options for nose and plugins
+        cfg_files = nose.core.all_config_files()
+        manager = nose.core.DefaultPluginManager()
+        config = nose.core.Config(
+            env=os.environ, files=cfg_files, plugins=manager)
+        config.plugins.addPlugins(list(_get_plugins_from_settings()))
+        options = config.getParser()._get_all_options()
+
+        # Gather existing option strings`
+        django_options = set()
+        for action in parser._actions:
+            for override in cls._argparse_remove_options:
+                if override in action.option_strings:
+                    # Emulate parser.conflict_handler='resolve'
+                    parser._handle_conflict_resolve(
+                        None, ((override, action),))
+            django_options.update(action.option_strings)
+
+        # Process nose optparse options
+        for option in options:
+            # Gather options
+            opt_long = option.get_opt_string()
+            if option._short_opts:
+                opt_short = option._short_opts[0]
+            else:
+                opt_short = None
+
+            # Rename nose's --verbosity to --nose-verbosity
+            if opt_long == '--verbosity':
+                opt_long = '--nose-verbosity'
+
+            # Skip any options also in Django options
+            if opt_long in django_options:
+                continue
+            if opt_short and opt_short in django_options:
+                opt_short = None
+
+            # Convert optparse attributes to argparse attributes
+            option_attrs = {}
+            for attr in option.ATTRS:
+                # Ignore callback options
+                if attr in cls._argparse_callback_options:
+                    continue
+
+                value = getattr(option, attr)
+
+                if attr == 'default' and value == NO_DEFAULT:
+                    continue
+
+                # Rename options for nose's --verbosity
+                if opt_long == '--nose-verbosity':
+                    if attr == 'dest':
+                        value = 'nose_verbosity'
+                    elif attr == 'metavar':
+                        value = 'NOSE_VERBOSITY'
+
+                # Omit arguments that are None, use default
+                if attr in cls._argparse_omit_if_none and value is None:
+                    continue
+
+                # Convert type from optparse string to argparse type
+                if attr == 'type':
+                    value = cls._argparse_type[value]
+
+                # Convert action='callback' to action='store'
+                if attr == 'action' and value == 'callback':
+                    action = 'store'
+
+                # Keep track of nargs=1
+                if attr == 'nargs':
+                    assert value == 1, (
+                        'argparse option nargs=%s is not supported' %
+                        value)
+                    cls._has_nargs.add(opt_long)
+                    if opt_short:
+                        cls._has_nargs.add(opt_short)
+
+                # Pass converted attribute to optparse option
+                option_attrs[attr] = value
+
+            # Add the optparse argument
+            if opt_short:
+                parser.add_argument(opt_short, opt_long, **option_attrs)
+            else:
+                parser.add_argument(opt_long, **option_attrs)
 
 
-class BasicNoseRunner(DiscoverRunner):
-    """Facade that implements a nose runner in the guise of a Django runner
+class BasicNoseRunner(BaseRunner):
+    """Facade that implements a nose runner in the guise of a Django runner.
 
     You shouldn't have to use this directly unless the additions made by
     ``NoseTestSuiteRunner`` really bother you. They shouldn't, because they're
     all off by default.
-
     """
-    __test__ = False
 
-    # Replace the builtin command options with the merged django/nose options:
-    options = _get_options()
+    __test__ = False
 
     def run_suite(self, nose_argv):
+        """Run the test suite."""
         result_plugin = ResultPlugin()
         plugins_to_add = [DjangoSetUpPlugin(self),
                           result_plugin,
@@ -155,18 +239,15 @@ class BasicNoseRunner(DiscoverRunner):
         for plugin in _get_plugins_from_settings():
             plugins_to_add.append(plugin)
 
-        try:
-            django.setup()
-        except AttributeError:
-            # Setup isn't necessary in Django < 1.7
-            pass
+        setup()
 
         nose.core.TestProgram(argv=nose_argv, exit=False,
                               addplugins=plugins_to_add)
         return result_plugin.result
 
     def run_tests(self, test_labels, extra_tests=None):
-        """Run the unit tests for all the test names in the provided list.
+        """
+        Run the unit tests for all the test names in the provided list.
 
         Test names specified may be file or module names, and may optionally
         indicate the test case to run by separating the module or file name
@@ -179,7 +260,6 @@ class BasicNoseRunner(DiscoverRunner):
         not the whole string.
 
         Examples:
-
         runner.run_tests( ('test.module',) )
         runner.run_tests(['another.test:TestCase.test_method'])
         runner.run_tests(['a.test:TestCase'])
@@ -197,15 +277,25 @@ class BasicNoseRunner(DiscoverRunner):
         if hasattr(settings, 'NOSE_ARGS'):
             nose_argv.extend(settings.NOSE_ARGS)
 
-        # Skip over 'manage.py test' and any arguments handled by django.
-        django_opts = ['--noinput', '--liveserver', '-p', '--pattern']
-        for opt in BaseCommand.option_list:
-            django_opts.extend(opt._long_opts)
-            django_opts.extend(opt._short_opts)
-
-        nose_argv.extend(translate_option(opt) for opt in sys.argv[1:]
-        if opt.startswith('-')
-           and not any(opt.startswith(d) for d in django_opts))
+        # Recreate the arguments in a nose-compatible format
+        arglist = sys.argv[1:]
+        has_nargs = getattr(self, '_has_nargs', set(['--verbosity']))
+        while arglist:
+            opt = arglist.pop(0)
+            if not opt.startswith('-'):
+                # Discard test labels
+                continue
+            if any(opt.startswith(d) for d in self.django_opts):
+                # Discard options handled by Djangp
+                continue
+
+            trans_opt = translate_option(opt)
+            nose_argv.append(trans_opt)
+
+            if opt in has_nargs:
+                # Handle arguments without an equals sign
+                opt_value = arglist.pop(0)
+                nose_argv.append(opt_value)
 
         # if --nose-verbosity was omitted, pass Django verbosity to nose
         if ('--verbosity' not in nose_argv and
@@ -224,11 +314,10 @@ _old_handle = Command.handle
 
 
 def _foreign_key_ignoring_handle(self, *fixture_labels, **options):
-    """Wrap the the stock loaddata to ignore foreign key
-    checks so we can load circular references from fixtures.
-
-    This is monkeypatched into place in setup_databases().
+    """Wrap the the stock loaddata to ignore foreign key checks.
 
+    This allows loading circular references from fixtures, and is
+    monkeypatched into place in setup_databases().
     """
     using = options.get('database', DEFAULT_DB_ALIAS)
     commit = options.get('commit', True)
@@ -245,20 +334,17 @@ def _foreign_key_ignoring_handle(self, *fixture_labels, **options):
         cursor = connection.cursor()
         cursor.execute('SET foreign_key_checks = 1')
 
-        # NOTE(erickt): This breaks installing Hue examples because we use
-        # loaddata to install the examples, then run Document.objects.sync() to
-        # clean up the database, so we need our connection to be left open.
-        #if commit:
-        #    connection.close()
+        if commit:
+            connection.close()
 
 
-def _skip_create_test_db(self, verbosity=1, autoclobber=False, serialize=True):
-    """``create_test_db`` implementation that skips both creation and flushing
+def _skip_create_test_db(self, verbosity=1, autoclobber=False, serialize=True,
+                         keepdb=True):
+    """``create_test_db`` implementation that skips both creation and flushing.
 
     The idea is to re-use the perfectly good test DB already created by an
     earlier test run, cutting the time spent before any tests run from 5-13s
     (depending on your I/O luck) down to 3.
-
     """
     # Notice that the DB supports transactions. Originally, this was done in
     # the method this overrides. The confirm method was added in Django v1.3
@@ -277,13 +363,12 @@ def _skip_create_test_db(self, verbosity=1, autoclobber=False, serialize=True):
 
 
 def _reusing_db():
-    """Return whether the ``REUSE_DB`` flag was passed"""
-    return os.getenv('REUSE_DB', 'false').lower() in ('true', '1', '')
+    """Return whether the ``REUSE_DB`` flag was passed."""
+    return os.getenv('REUSE_DB', 'false').lower() in ('true', '1')
 
 
 def _can_support_reuse_db(connection):
-    """Return whether it makes any sense to
-    use REUSE_DB with the backend of a connection."""
+    """Return True if REUSE_DB is a sensible option for the backend."""
     # Perhaps this is a SQLite in-memory DB. Those are created implicitly when
     # you try to connect to them, so our usual test doesn't work.
     return not connection.creation._get_test_db_name() == ':memory:'
@@ -293,7 +378,6 @@ def _should_create_database(connection):
     """Return whether we should recreate the given DB.
 
     This is true if the DB doesn't exist or the REUSE_DB env var isn't truthy.
-
     """
     # TODO: Notice when the Model classes change and return True. Worst case,
     # we can generate sqlall and hash it, though it's a bit slow (2 secs) and
@@ -306,6 +390,13 @@ def _should_create_database(connection):
 
     # Notice whether the DB exists, and create it if it doesn't:
     try:
+        # Connections are cached by some backends, if other code has connected
+        # to the database previously under a different database name the
+        # cached connection will be used and no exception will be raised.
+        # Avoiding this by closing connections and setting to null
+        for connection in connections.all():
+            connection.close()
+        connection.connection = None
         connection.cursor()
     except Exception:  # TODO: Be more discerning but still DB agnostic.
         return True
@@ -313,11 +404,10 @@ def _should_create_database(connection):
 
 
 def _mysql_reset_sequences(style, connection):
-    """Return a list of SQL statements needed to
-    reset all sequences for Django tables."""
+    """Return a SQL statements needed to reset Django tables."""
     tables = connection.introspection.django_table_names(only_existing=True)
     flush_statements = connection.ops.sql_flush(
-            style, tables, connection.introspection.sequence_list())
+        style, tables, connection.introspection.sequence_list())
 
     # connection.ops.sequence_reset_sql() is not implemented for MySQL,
     # and the base class just returns []. TODO: Implement it by pulling
@@ -330,14 +420,13 @@ def _mysql_reset_sequences(style, connection):
 
 
 class NoseTestSuiteRunner(BasicNoseRunner):
-    """A runner that optionally skips DB creation
+    """A runner that optionally skips DB creation.
 
     Monkeypatches connection.creation to let you skip creating databases if
     they already exist. Your tests will start up much faster.
 
     To opt into this behavior, set the environment variable ``REUSE_DB`` to
-    something that isn't "0" or "false" (case insensitive).
-
+    "1" or "true" (case insensitive).
     """
 
     def _get_models_for_connection(self, connection):
@@ -347,6 +436,7 @@ class NoseTestSuiteRunner(BasicNoseRunner):
                 m._meta.db_table in tables]
 
     def setup_databases(self):
+        """Set up databases. Skip DB creation if requested and possible."""
         for alias in connections:
             connection = connections[alias]
             creation = connection.creation
@@ -381,21 +471,22 @@ class NoseTestSuiteRunner(BasicNoseRunner):
                         style, connection)
                 else:
                     reset_statements = connection.ops.sequence_reset_sql(
-                            style, self._get_models_for_connection(connection))
-
-                for reset_statement in reset_statements:
-                    cursor.execute(reset_statement)
+                        style, self._get_models_for_connection(connection))
 
-                # Django v1.3 (https://code.djangoproject.com/ticket/9964)
-                # starts using commit_unless_managed() for individual
-                # connections. Backwards compatibility for Django 1.2 is to use
-                # the generic transaction function.
-                transaction.commit_unless_managed(using=connection.alias)
+                if hasattr(transaction, "atomic"):
+                    with transaction.atomic(using=connection.alias):
+                        for reset_statement in reset_statements:
+                            cursor.execute(reset_statement)
+                else:
+                    # Django < 1.6
+                    for reset_statement in reset_statements:
+                        cursor.execute(reset_statement)
+                    transaction.commit_unless_managed(using=connection.alias)
 
                 # Each connection has its own creation object, so this affects
                 # only a single connection:
                 creation.create_test_db = MethodType(
-                        _skip_create_test_db, creation, creation.__class__)
+                    _skip_create_test_db, creation)
 
         Command.handle = _foreign_key_ignoring_handle
 
@@ -407,5 +498,5 @@ class NoseTestSuiteRunner(BasicNoseRunner):
         """Leave those poor, reusable databases alone if REUSE_DB is true."""
         if not _reusing_db():
             return super(NoseTestSuiteRunner, self).teardown_databases(
-                    *args, **kwargs)
+                *args, **kwargs)
         # else skip tearing down the DB so we can reuse it next time

+ 9 - 5
desktop/core/ext-py/django-nose-1.3/django_nose/testcases.py → desktop/core/ext-py/django-nose-1.4.5/django_nose/testcases.py

@@ -1,3 +1,7 @@
+# coding: utf-8
+"""TestCases that enable extra django-nose functionality."""
+from __future__ import unicode_literals
+
 from django import test
 from django.conf import settings
 from django.core import cache, mail
@@ -8,11 +12,11 @@ from django_nose.fixture_tables import tables_used_by_fixtures
 from django_nose.utils import uses_mysql
 
 
-__all__ = ['FastFixtureTestCase']
+__all__ = ('FastFixtureTestCase', )
 
 
 class FastFixtureTestCase(test.TransactionTestCase):
-    """Test case that loads fixtures once and for all rather than once per test
+    """Test case that loads fixtures once rather than once per test.
 
     Using this can save huge swaths of time while still preserving test
     isolation. Fixture data is loaded at class setup time, and the transaction
@@ -30,8 +34,8 @@ class FastFixtureTestCase(test.TransactionTestCase):
     For best speed, group tests using the same fixtures into as few classes as
     possible. Better still, don't do that, and instead use the fixture-bundling
     plugin from django-nose, which does it dynamically at test time.
-
     """
+
     cleans_up_after_itself = True  # This is the good kind of puppy.
 
     @classmethod
@@ -64,7 +68,7 @@ class FastFixtureTestCase(test.TransactionTestCase):
         """Load fixture data, and commit."""
         for db in cls._databases():
             if (hasattr(cls, 'fixtures') and
-                getattr(cls, '_fb_should_setup_fixtures', True)):
+                    getattr(cls, '_fb_should_setup_fixtures', True)):
                 # Iff the fixture-bundling test runner tells us we're the first
                 # suite having these fixtures, set them up:
                 call_command('loaddata', *cls.fixtures, **{'verbosity': 0,
@@ -121,7 +125,7 @@ class FastFixtureTestCase(test.TransactionTestCase):
         test.testcases.disable_transaction_methods()
 
         self.client = self.client_class()
-        #self._fixture_setup()
+        # self._fixture_setup()
         self._urlconf_setup()
         mail.outbox = []
 

+ 91 - 0
desktop/core/ext-py/django-nose-1.4.5/django_nose/tools.py

@@ -0,0 +1,91 @@
+# coding: utf-8
+# vim: tabstop=4 expandtab autoindent shiftwidth=4 fileencoding=utf-8
+"""Provides Nose and Django test case assert functions."""
+
+from __future__ import unicode_literals
+
+
+def _get_nose_vars():
+    """Collect assert_*, ok_, and eq_ from nose.tools."""
+    from nose import tools
+    new_names = {}
+    for t in dir(tools):
+        if t.startswith('assert_') or t in ('ok_', 'eq_'):
+            new_names[t] = getattr(tools, t)
+    return new_names
+
+
+for _name, _value in _get_nose_vars().items():
+    vars()[_name] = _value
+
+
+def _get_django_vars():
+    """Collect assert_* methods from Django's TransactionTestCase."""
+    import re
+    from django.test.testcases import TransactionTestCase
+    camelcase = re.compile('([a-z][A-Z]|[A-Z][a-z])')
+
+    def insert_underscore(m):
+            """Insert an appropriate underscore into the name."""
+            a, b = m.group(0)
+            if b.islower():
+                return '_{}{}'.format(a, b)
+            else:
+                return '{}_{}'.format(a, b)
+
+    def pep8(name):
+        """Replace camelcase name with PEP8 equivalent."""
+        return str(camelcase.sub(insert_underscore, name).lower())
+
+    class Dummy(TransactionTestCase):
+        """A dummy test case for gathering current assertion helpers."""
+
+        def nop():
+            """Do nothing, dummy test to get an initialized test case."""
+            pass
+    dummy_test = Dummy('nop')
+
+    new_names = {}
+    for assert_name in [at for at in dir(dummy_test)
+                        if at.startswith('assert') and '_' not in at]:
+        pepd = pep8(assert_name)
+        new_names[pepd] = getattr(dummy_test, assert_name)
+    return new_names
+
+
+for _name, _value in _get_django_vars().items():
+    vars()[_name] = _value
+
+
+#
+# Additional assertions
+#
+
+def assert_code(response, status_code, msg_prefix=''):
+    """Assert the response was returned with the given status code."""
+    if msg_prefix:
+        msg_prefix = '%s: ' % msg_prefix
+
+    assert response.status_code == status_code, \
+        'Response code was %d (expected %d)' % (
+            response.status_code, status_code)
+
+
+def assert_ok(response, msg_prefix=''):
+    """Assert the response was returned with status 200 (OK)."""
+    return assert_code(response, 200, msg_prefix=msg_prefix)
+
+
+def assert_mail_count(count, msg=None):
+    """Assert the number of emails sent.
+
+    The message here tends to be long, so allow for replacing the whole
+    thing instead of prefixing.
+    """
+    from django.core import mail
+
+    if msg is None:
+        msg = ', '.join([e.subject for e in mail.outbox])
+        msg = '%d != %d %s' % (len(mail.outbox), count, msg)
+    # assert_equals is dynamicaly added above. F821 is undefined name error
+    assert_equals(len(mail.outbox), count, msg)  # noqa: F821

+ 9 - 3
desktop/core/ext-py/django-nose-1.3/django_nose/utils.py → desktop/core/ext-py/django-nose-1.4.5/django_nose/utils.py

@@ -1,5 +1,12 @@
+# coding: utf-8
+"""django-nose utility methods."""
+from __future__ import unicode_literals
+
+
 def process_tests(suite, process):
-    """Given a nested disaster of [Lazy]Suites, traverse to the first level
+    """Find and process the suite with setup/teardown methods.
+
+    Given a nested disaster of [Lazy]Suites, traverse to the first level
     that has setup or teardown, and do something to them.
 
     If we were to traverse all the way to the leaves (the Tests)
@@ -17,10 +24,9 @@ def process_tests(suite, process):
 
     :arg process: The thing to call once we get to a leaf or a test with setup
         or teardown
-
     """
     if (not hasattr(suite, '_tests') or
-        (hasattr(suite, 'hasFixtures') and suite.hasFixtures())):
+            (hasattr(suite, 'hasFixtures') and suite.hasFixtures())):
         # We hit a Test or something with setup, so do the thing. (Note that
         # "fixtures" here means setup or teardown routines, not Django
         # fixtures.)

+ 177 - 0
desktop/core/ext-py/django-nose-1.4.5/docs/Makefile

@@ -0,0 +1,177 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+PAPER         =
+BUILDDIR      = _build
+
+# User-friendly check for sphinx-build
+ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
+$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
+endif
+
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
+
+help:
+	@echo "Please use \`make <target>' where <target> is one of"
+	@echo "  html       to make standalone HTML files"
+	@echo "  dirhtml    to make HTML files named index.html in directories"
+	@echo "  singlehtml to make a single large HTML file"
+	@echo "  pickle     to make pickle files"
+	@echo "  json       to make JSON files"
+	@echo "  htmlhelp   to make HTML files and a HTML help project"
+	@echo "  qthelp     to make HTML files and a qthelp project"
+	@echo "  devhelp    to make HTML files and a Devhelp project"
+	@echo "  epub       to make an epub"
+	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
+	@echo "  latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
+	@echo "  text       to make text files"
+	@echo "  man        to make manual pages"
+	@echo "  texinfo    to make Texinfo files"
+	@echo "  info       to make Texinfo files and run them through makeinfo"
+	@echo "  gettext    to make PO message catalogs"
+	@echo "  changes    to make an overview of all changed/added/deprecated items"
+	@echo "  xml        to make Docutils-native XML files"
+	@echo "  pseudoxml  to make pseudoxml-XML files for display purposes"
+	@echo "  linkcheck  to check all external links for integrity"
+	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+	rm -rf $(BUILDDIR)/*
+
+html:
+	$(SPHINXBUILD) -W -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+	@echo
+	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+	@echo
+	@echo "Build finished; now you can process the pickle files."
+
+json:
+	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+	@echo
+	@echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+	@echo
+	@echo "Build finished; now you can run HTML Help Workshop with the" \
+	      ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+	@echo
+	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
+	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/django-nose.qhcp"
+	@echo "To view the help file:"
+	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/django-nose.qhc"
+
+devhelp:
+	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+	@echo
+	@echo "Build finished."
+	@echo "To view the help file:"
+	@echo "# mkdir -p $$HOME/.local/share/devhelp/django-nose"
+	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/django-nose"
+	@echo "# devhelp"
+
+epub:
+	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+	@echo
+	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo
+	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+	@echo "Run \`make' in that directory to run these through (pdf)latex" \
+	      "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through pdflatex..."
+	$(MAKE) -C $(BUILDDIR)/latex all-pdf
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+latexpdfja:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through platex and dvipdfmx..."
+	$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+	@echo
+	@echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+	@echo
+	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+texinfo:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo
+	@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+	@echo "Run \`make' in that directory to run these through makeinfo" \
+	      "(use \`make info' here to do that automatically)."
+
+info:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo "Running Texinfo files through makeinfo..."
+	make -C $(BUILDDIR)/texinfo info
+	@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+
+gettext:
+	$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
+	@echo
+	@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+
+changes:
+	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+	@echo
+	@echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+	@echo
+	@echo "Link check complete; look for any errors in the above output " \
+	      "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+	@echo "Testing of doctests in the sources finished, look at the " \
+	      "results in $(BUILDDIR)/doctest/output.txt."
+
+xml:
+	$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
+	@echo
+	@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
+
+pseudoxml:
+	$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
+	@echo
+	@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."

+ 0 - 0
desktop/core/ext-py/django-nose-1.3/django_nose/management/__init__.py → desktop/core/ext-py/django-nose-1.4.5/docs/_static/.keep


+ 1 - 0
desktop/core/ext-py/django-nose-1.4.5/docs/authors.rst

@@ -0,0 +1 @@
+.. include:: ../AUTHORS.rst

+ 1 - 0
desktop/core/ext-py/django-nose-1.4.5/docs/changelog.rst

@@ -0,0 +1 @@
+.. include:: ../changelog.rst

+ 263 - 0
desktop/core/ext-py/django-nose-1.4.5/docs/conf.py

@@ -0,0 +1,263 @@
+# -*- coding: utf-8 -*-
+"""django-nose build configuration file.
+
+Created by sphinx-quickstart on Mon Jul 21 13:24:51 2014.
+
+This file is execfile()d with the current directory set to its
+containing dir.
+
+Note that not all possible configuration values are present in this
+autogenerated file.
+
+All configuration values have a default; values that are commented out
+serve to show the default.
+"""
+from __future__ import unicode_literals
+from datetime import date
+import sys
+import os
+
+cwd = os.getcwd()
+parent = os.path.dirname(cwd)
+sys.path.append(parent)
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testapp.settings")
+
+from django_nose import __version__  # flake8: noqa
+
+# -- General configuration ------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+# needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+# source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = 'django-nose'
+copyright = (
+    '2010-%d, Jeff Balogh and the django-nose team.' % date.today().year)
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = __version__
+# The full version, including alpha/beta/rc tags.
+release = __version__
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+# language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+# today = ''
+# Else, today_fmt is used as the format for a strftime call.
+# today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build']
+
+# The reST default role (used for this markup: `text`) to use for all
+# documents.
+# default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+# add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+# add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+# show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+# modindex_common_prefix = []
+
+# If true, keep warnings as "system message" paragraphs in the built documents.
+# keep_warnings = False
+
+
+# -- Options for HTML output ----------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+html_theme = 'alabaster'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+# html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+# html_theme_path = []
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+# html_title = None
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+# html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+# html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+# html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# Add any extra paths that contain custom files (such as robots.txt or
+# .htaccess) here, relative to this directory. These files are copied
+# directly to the root of the documentation.
+# html_extra_path = []
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+# html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+# html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+# html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+# html_additional_pages = {}
+
+# If false, no module index is generated.
+# html_domain_indices = True
+
+# If false, no index is generated.
+# html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+# html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+# html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+# html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+# html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+# html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+# html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'django-nose-doc'
+
+
+# -- Options for LaTeX output ---------------------------------------------
+
+latex_elements = {
+    # The paper size ('letterpaper' or 'a4paper').
+    # 'papersize': 'letterpaper',
+
+    # The font size ('10pt', '11pt' or '12pt').
+    # 'pointsize': '10pt',
+
+    # Additional stuff for the LaTeX preamble.
+    # 'preamble': '',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+#  author, documentclass [howto, manual, or own class]).
+latex_documents = [
+    ('index', 'django-nose.tex', 'django-nose Documentation',
+     'Jeff Balogh and the django-nose team', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+# latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+# latex_use_parts = False
+
+# If true, show page references after internal links.
+# latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+# latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+# latex_appendices = []
+
+# If false, no module index is generated.
+# latex_domain_indices = True
+
+
+# -- Options for manual page output ---------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+    ('index', 'django-nose', 'django-nose Documentation',
+     ['Jeff Balogh', 'the django-nose team'], 1)
+]
+
+# If true, show URL addresses after external links.
+# man_show_urls = False
+
+
+# -- Options for Texinfo output -------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+#  dir menu entry, description, category)
+texinfo_documents = [
+    ('index', 'django-nose', 'django-nose Documentation',
+     'Jeff Balogh and the django-nose team', 'django-nose',
+     'Makes your Django tests simple and snappy')
+]
+
+# Documents to append as an appendix to all manuals.
+# texinfo_appendices = []
+
+# If false, no module index is generated.
+# texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+# texinfo_show_urls = 'footnote'
+
+# If true, do not generate a @detailmenu in the "Top" node's menu.
+# texinfo_no_detailmenu = False

+ 1 - 0
desktop/core/ext-py/django-nose-1.4.5/docs/contributing.rst

@@ -0,0 +1 @@
+.. include:: ../CONTRIBUTING.rst

+ 29 - 0
desktop/core/ext-py/django-nose-1.4.5/docs/index.rst

@@ -0,0 +1,29 @@
+.. django-nose documentation master file
+
+===========
+django-nose
+===========
+
+.. include:: ../README.rst
+    :start-after: .. Omit badges from docs
+
+Contents
+--------
+
+.. toctree::
+   :maxdepth: 2
+
+   installation
+   usage
+   upgrading
+   contributing
+   authors
+   changelog
+
+Indices and tables
+------------------
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+

+ 33 - 0
desktop/core/ext-py/django-nose-1.4.5/docs/installation.rst

@@ -0,0 +1,33 @@
+Installation
+------------
+
+You can get django-nose from PyPI with... :
+
+.. code-block:: shell
+
+    $ pip install django-nose
+
+The development version can be installed with... :
+
+.. code-block:: shell
+
+    $ pip install -e git://github.com/django-nose/django-nose.git#egg=django-nose
+
+Since django-nose extends Django's built-in test command, you should add it to
+your ``INSTALLED_APPS`` in ``settings.py``:
+
+.. code-block:: python
+
+    INSTALLED_APPS = (
+        ...
+        'django_nose',
+        ...
+    )
+
+Then set ``TEST_RUNNER`` in ``settings.py``:
+
+.. code-block:: python
+
+    TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
+
+

+ 242 - 0
desktop/core/ext-py/django-nose-1.4.5/docs/make.bat

@@ -0,0 +1,242 @@
+@ECHO OFF
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+	set SPHINXBUILD=sphinx-build
+)
+set BUILDDIR=_build
+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
+set I18NSPHINXOPTS=%SPHINXOPTS% .
+if NOT "%PAPER%" == "" (
+	set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
+	set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
+)
+
+if "%1" == "" goto help
+
+if "%1" == "help" (
+	:help
+	echo.Please use `make ^<target^>` where ^<target^> is one of
+	echo.  html       to make standalone HTML files
+	echo.  dirhtml    to make HTML files named index.html in directories
+	echo.  singlehtml to make a single large HTML file
+	echo.  pickle     to make pickle files
+	echo.  json       to make JSON files
+	echo.  htmlhelp   to make HTML files and a HTML help project
+	echo.  qthelp     to make HTML files and a qthelp project
+	echo.  devhelp    to make HTML files and a Devhelp project
+	echo.  epub       to make an epub
+	echo.  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter
+	echo.  text       to make text files
+	echo.  man        to make manual pages
+	echo.  texinfo    to make Texinfo files
+	echo.  gettext    to make PO message catalogs
+	echo.  changes    to make an overview over all changed/added/deprecated items
+	echo.  xml        to make Docutils-native XML files
+	echo.  pseudoxml  to make pseudoxml-XML files for display purposes
+	echo.  linkcheck  to check all external links for integrity
+	echo.  doctest    to run all doctests embedded in the documentation if enabled
+	goto end
+)
+
+if "%1" == "clean" (
+	for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
+	del /q /s %BUILDDIR%\*
+	goto end
+)
+
+
+%SPHINXBUILD% 2> nul
+if errorlevel 9009 (
+	echo.
+	echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
+	echo.installed, then set the SPHINXBUILD environment variable to point
+	echo.to the full path of the 'sphinx-build' executable. Alternatively you
+	echo.may add the Sphinx directory to PATH.
+	echo.
+	echo.If you don't have Sphinx installed, grab it from
+	echo.http://sphinx-doc.org/
+	exit /b 1
+)
+
+if "%1" == "html" (
+	%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/html.
+	goto end
+)
+
+if "%1" == "dirhtml" (
+	%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
+	goto end
+)
+
+if "%1" == "singlehtml" (
+	%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
+	goto end
+)
+
+if "%1" == "pickle" (
+	%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can process the pickle files.
+	goto end
+)
+
+if "%1" == "json" (
+	%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can process the JSON files.
+	goto end
+)
+
+if "%1" == "htmlhelp" (
+	%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can run HTML Help Workshop with the ^
+.hhp project file in %BUILDDIR%/htmlhelp.
+	goto end
+)
+
+if "%1" == "qthelp" (
+	%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can run "qcollectiongenerator" with the ^
+.qhcp project file in %BUILDDIR%/qthelp, like this:
+	echo.^> qcollectiongenerator %BUILDDIR%\qthelp\django-nose.qhcp
+	echo.To view the help file:
+	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\django-nose.ghc
+	goto end
+)
+
+if "%1" == "devhelp" (
+	%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished.
+	goto end
+)
+
+if "%1" == "epub" (
+	%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The epub file is in %BUILDDIR%/epub.
+	goto end
+)
+
+if "%1" == "latex" (
+	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
+	goto end
+)
+
+if "%1" == "latexpdf" (
+	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+	cd %BUILDDIR%/latex
+	make all-pdf
+	cd %BUILDDIR%/..
+	echo.
+	echo.Build finished; the PDF files are in %BUILDDIR%/latex.
+	goto end
+)
+
+if "%1" == "latexpdfja" (
+	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+	cd %BUILDDIR%/latex
+	make all-pdf-ja
+	cd %BUILDDIR%/..
+	echo.
+	echo.Build finished; the PDF files are in %BUILDDIR%/latex.
+	goto end
+)
+
+if "%1" == "text" (
+	%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The text files are in %BUILDDIR%/text.
+	goto end
+)
+
+if "%1" == "man" (
+	%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The manual pages are in %BUILDDIR%/man.
+	goto end
+)
+
+if "%1" == "texinfo" (
+	%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
+	goto end
+)
+
+if "%1" == "gettext" (
+	%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
+	goto end
+)
+
+if "%1" == "changes" (
+	%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.The overview file is in %BUILDDIR%/changes.
+	goto end
+)
+
+if "%1" == "linkcheck" (
+	%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Link check complete; look for any errors in the above output ^
+or in %BUILDDIR%/linkcheck/output.txt.
+	goto end
+)
+
+if "%1" == "doctest" (
+	%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Testing of doctests in the sources finished, look at the ^
+results in %BUILDDIR%/doctest/output.txt.
+	goto end
+)
+
+if "%1" == "xml" (
+	%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The XML files are in %BUILDDIR%/xml.
+	goto end
+)
+
+if "%1" == "pseudoxml" (
+	%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
+	goto end
+)
+
+:end

+ 51 - 0
desktop/core/ext-py/django-nose-1.4.5/docs/upgrading.rst

@@ -0,0 +1,51 @@
+Upgrading Django
+================
+
+Upgrading from Django <= 1.3 to Django 1.4
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+In versions of Django < 1.4 the project folder was in fact a python package as
+well (note the __init__.py in your project root). In Django 1.4, there is no
+such file and thus the project is not a python module.
+
+**When you upgrade your Django project to the Django 1.4 layout, you need to
+remove the __init__.py file in the root of your project (and move any python
+files that reside there other than the manage.py) otherwise you will get a
+`ImportError: No module named urls` exception.**
+
+This happens because Nose will intelligently try to populate your sys.path, and
+in this particular case includes your parent directory if your project has a
+__init__.py file (see: https://github.com/nose-devs/nose/blob/release_1.1.2/nose/importer.py#L134).
+
+This means that even though you have set up your directory structure properly and
+set your `ROOT_URLCONF='my_project.urls'` to match the new structure, when running
+django-nose's test runner it will try to find your urls.py file in `'my_project.my_project.urls'`.
+
+
+Upgrading from Django < 1.2
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Django 1.2 switches to a `class-based test runner`_. To use django-nose
+with Django 1.2, change your ``TEST_RUNNER`` from ``django_nose.run_tests`` to
+``django_nose.NoseTestSuiteRunner``.
+
+``django_nose.run_tests`` will continue to work in Django 1.2 but will raise a
+warning. In Django 1.3, it will stop working.
+
+If you were using ``django_nose.run_gis_tests``, you should also switch to
+``django_nose.NoseTestSuiteRunner`` and use one of the `spatial backends`_ in
+your ``DATABASES`` settings.
+
+.. _class-based test runner: http://docs.djangoproject.com/en/dev/releases/1.2/#function-based-test-runners
+.. _spatial backends: http://docs.djangoproject.com/en/dev/ref/contrib/gis/db-api/#id1
+
+Django 1.1
+~~~~~~~~~~
+
+If you want to use django-nose with Django 1.1, use
+https://github.com/django-nose/django-nose/tree/django-1.1 or
+http://pypi.python.org/pypi/django-nose/0.0.3.
+
+Django 1.0
+~~~~~~~~~~
+
+django-nose does not support Django 1.0.

+ 14 - 170
desktop/core/ext-py/django-nose-1.3/README.rst → desktop/core/ext-py/django-nose-1.4.5/docs/usage.rst

@@ -1,61 +1,5 @@
-===========
-django-nose
-===========
-
-.. image:: https://travis-ci.org/django-nose/django-nose.png
-  :target: https://travis-ci.org/django-nose/django-nose
-
-Features
---------
-
-* All the goodness of `nose`_ in your Django tests, like...
-
-  * Testing just your apps by default, not all the standard ones that happen to
-    be in ``INSTALLED_APPS``
-  * Running the tests in one or more specific modules (or apps, or classes, or
-    folders, or just running a specific test)
-  * Obviating the need to import all your tests into ``tests/__init__.py``.
-    This not only saves busy-work but also eliminates the possibility of
-    accidentally shadowing test classes.
-  * Taking advantage of all the useful `nose plugins`_
-* Fixture bundling, an optional feature which speeds up your fixture-based
-  tests by a factor of 4
-* Reuse of previously created test DBs, cutting 10 seconds off startup time
-* Hygienic TransactionTestCases, which can save you a DB flush per test
-* Support for various databases. Tested with MySQL, PostgreSQL, and SQLite.
-  Others should work as well.
-
-.. _nose: http://somethingaboutorange.com/mrl/projects/nose/
-.. _nose plugins: http://nose-plugins.jottit.com/
-
-
-Installation
-------------
-
-You can get django-nose from PyPI with... ::
-
-    pip install django-nose
-
-The development version can be installed with... ::
-
-    pip install -e git://github.com/django-nose/django-nose.git#egg=django-nose
-
-Since django-nose extends Django's built-in test command, you should add it to
-your ``INSTALLED_APPS`` in ``settings.py``::
-
-    INSTALLED_APPS = (
-        ...
-        'django_nose',
-        ...
-    )
-
-Then set ``TEST_RUNNER`` in ``settings.py``::
-
-    TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
-
-
-Use
----
+Usage
+=====
 
 The day-to-day use of django-nose is mostly transparent; just run ``./manage.py
 test`` as usual.
@@ -63,12 +7,16 @@ test`` as usual.
 See ``./manage.py help test`` for all the options nose provides, and look to
 the `nose docs`_ for more help with nose.
 
-.. _nose docs: http://somethingaboutorange.com/mrl/projects/nose/
-
+.. _nose docs: https://nose.readthedocs.io/en/latest/
 
 Enabling Database Reuse
 -----------------------
 
+.. warning:: There are several
+   `open issues <https://github.com/django-nose/django-nose/milestones/Fix%20REUSE_DB=1>`_
+   with this feature, including
+   `reports of data loss <https://github.com/django-nose/django-nose/issues/76>`_.
+
 You can save several seconds at the beginning and end of your test suite by
 reusing the test database from the last run. To do this, set the environment
 variable ``REUSE_DB`` to 1::
@@ -87,6 +35,10 @@ you want to use it.
 Enabling Fast Fixtures
 ----------------------
 
+.. warning:: There are several
+   `known issues <https://github.com/django-nose/django-nose/milestones/Fix%20FastFixtureTestCase>`_
+   with this feature.
+
 django-nose includes a fixture bundler which drastically speeds up your tests
 by eliminating redundant setup of Django test fixtures. To use it...
 
@@ -225,16 +177,6 @@ and some of its own as functions. ::
    assert_mail_count(count, msg=None)
 
 
-Using With South
-----------------
-
-`South`_ installs its own test command that turns off migrations during
-testing. Make sure that django-nose comes *after* ``south`` in
-``INSTALLED_APPS`` so that django_nose's test command is used.
-
-.. _South: http://south.aeracode.org/
-
-
 Always Passing The Same Options
 -------------------------------
 
@@ -243,7 +185,7 @@ setup.cfg`_ (as usual) or you can specify them in settings.py like this::
 
     NOSE_ARGS = ['--failed', '--stop']
 
-.. _nose.cfg or setup.cfg: http://somethingaboutorange.com/mrl/projects/nose/0.11.2/usage.html#configuration
+.. _nose.cfg or setup.cfg: https://nose.readthedocs.io/en/latest/usage.html#configuration
 
 
 Custom Plugins
@@ -261,103 +203,5 @@ Just like middleware or anything else, each string must be a dot-separated,
 importable path to an actual class. Each plugin class will be instantiated and
 added to the Nose test runner.
 
-.. _make custom plugins: http://somethingaboutorange.com/mrl/projects/nose/0.11.2/plugins.html#writing-plugins
-
-
-Older Versions of Django
-------------------------
-Upgrading from Django <= 1.3 to Django 1.4
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-In versions of Django < 1.4 the project folder was in fact a python package as
-well (note the __init__.py in your project root). In Django 1.4, there is no
-such file and thus the project is not a python module.
-
-**When you upgrade your Django project to the Django 1.4 layout, you need to
-remove the __init__.py file in the root of your project (and move any python
-files that reside there other than the manage.py) otherwise you will get a
-`ImportError: No module named urls` exception.**
-
-This happens because Nose will intelligently try to populate your sys.path, and
-in this particular case includes your parent directory if your project has a
-__init__.py file (see: https://github.com/nose-devs/nose/blob/release_1.1.2/nose/importer.py#L134).
-
-This means that even though you have set up your directory structure properly and
-set your `ROOT_URLCONF='my_project.urls'` to match the new structure, when running
-django-nose's test runner it will try to find your urls.py file in `'my_project.my_project.urls'`.
-
-
-Upgrading from Django < 1.2
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Django 1.2 switches to a `class-based test runner`_. To use django-nose
-with Django 1.2, change your ``TEST_RUNNER`` from ``django_nose.run_tests`` to
-``django_nose.NoseTestSuiteRunner``.
-
-``django_nose.run_tests`` will continue to work in Django 1.2 but will raise a
-warning. In Django 1.3, it will stop working.
-
-If you were using ``django_nose.run_gis_tests``, you should also switch to
-``django_nose.NoseTestSuiteRunner`` and use one of the `spatial backends`_ in
-your ``DATABASES`` settings.
-
-.. _class-based test runner: http://docs.djangoproject.com/en/dev/releases/1.2/#function-based-test-runners
-.. _spatial backends: http://docs.djangoproject.com/en/dev/ref/contrib/gis/db-api/#id1
-
-Django 1.1
-~~~~~~~~~~
-
-If you want to use django-nose with Django 1.1, use
-https://github.com/django-nose/django-nose/tree/django-1.1 or
-http://pypi.python.org/pypi/django-nose/0.0.3.
-
-Django 1.0
-~~~~~~~~~~
-
-django-nose does not support Django 1.0.
-
-
-Recent Version History
-----------------------
+.. _make custom plugins: https://nose.readthedocs.io/en/latest/plugins.html#writing-plugins
 
-1.3 (2014-12-05)
-  * Django 1.6 and 1.7 support (conrado, co3k, Nepherhotep, mbertheau)
-  * Python 3.3 and 3.4 testing and support (frewsxcv, jsocol)
-
-1.2 (2013-07-23)
-  * Python 3 support (melinath and jonashaag)
-  * Django 1.5 compat (fabiosantoscode)
-
-1.1 (2012-05-19)
-  * Django TransactionTestCases don't clean up after themselves; they leave
-    junk in the DB and clean it up only on ``_pre_setup``. Thus, Django makes
-    sure these tests run last. Now django-nose does, too. This means one fewer
-    source of failures on existing projects. (Erik Rose)
-  * Add support for hygienic TransactionTestCases. (Erik Rose)
-  * Support models that are used only for tests. Just put them in any file
-    imported in the course of loading tests. No more crazy hacks necessary.
-    (Erik Rose)
-  * Make the fixture bundler more conservative, fixing some conceivable
-    situations in which fixtures would not appear as intended if a
-    TransactionTestCase found its way into the middle of a bundle. (Erik Rose)
-  * Fix an error that would surface when using SQLAlchemy with connection
-    pooling. (Roger Hu)
-  * Gracefully ignore the new ``--liveserver`` option introduced in Django 1.4;
-    don't let it through to nose. (Adam DePue)
-
-1.0 (2012-03-12)
-  * New fixture-bundling plugin for avoiding needless fixture setup (Erik Rose)
-  * Moved FastFixtureTestCase in from test-utils, so now all the
-    fixture-bundling stuff is in one library. (Erik Rose)
-  * Added the REUSE_DB setting for faster startup and shutdown. (Erik Rose)
-  * Fixed a crash when printing options with certain verbosities. (Daniel Abel)
-  * Broke hard dependency on MySQL. Support PostgreSQL. (Roger Hu)
-  * Support SQLite, both memory- and disk-based. (Roger Hu and Erik Rose)
-  * Nail down versions of the package requirements. (Daniel Mizyrycki)
-
-0.1.3 (2010-04-15)
-  * Even better coverage support (rozza)
-  * README fixes (carljm and ionelmc)
-  * optparse OptionGroups are handled better (outofculture)
-  * nose plugins are loaded before listing options
-
-See more in changelog.txt.

+ 11 - 0
desktop/core/ext-py/django-nose-1.4.5/manage.py

@@ -0,0 +1,11 @@
+#!/usr/bin/env python
+"""Django command-line utility for administrative tasks."""
+import os
+import sys
+
+if __name__ == "__main__":
+    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testapp.settings")
+
+    from django.core.management import execute_from_command_line
+
+    execute_from_command_line(sys.argv)

+ 5 - 0
desktop/core/ext-py/django-nose-1.4.5/requirements-rtd.txt

@@ -0,0 +1,5 @@
+# Requirements for ReadTheDocs
+# Must be set in the RTD Admin, at:
+# https://readthedocs.org/dashboard/django-nose/advanced/
+Django>=1.10,<1.11
+nose

+ 39 - 0
desktop/core/ext-py/django-nose-1.4.5/requirements.txt

@@ -0,0 +1,39 @@
+#
+# Requirements for running django-nose testapp
+#
+
+# Latest Django
+Django>=1.11,<2.0
+
+# This project
+-e .
+
+# Load database config from environment
+dj-database-url==0.4.2
+
+# Packaging
+wheel==0.29.0
+twine==1.9.1
+
+# PEP8, PEP257, and static analysis
+flake8==3.4.1
+flake8-docstrings==1.1.0
+
+# Code coverage
+coverage==4.4.1
+
+# Documentation
+Sphinx==1.6.3
+
+# Packaging Linters
+check-manifest==0.35
+pyroma==2.2
+
+# Multi-env test runner
+tox==2.7.0
+
+# Better interactive debugging
+gnureadline==6.3.3
+ipython==5.4.1
+ipdb==0.10.3
+ipdbplugin==1.4.5

+ 190 - 0
desktop/core/ext-py/django-nose-1.4.5/runtests.sh

@@ -0,0 +1,190 @@
+#!/bin/bash
+
+# Parse command line
+VERBOSE=0
+HELP=0
+ERR=0
+NOINPUT=""
+while [[ $# > 0 ]]
+do
+    key="$1"
+    case $key in
+        -h|--help)
+            HELP=1
+            ;;
+        -v|--verbose)
+            VERBOSE=1
+            ;;
+        --noinput)
+            NOINPUT="--noinput"
+            ;;
+        *)
+            echo "Unknown option '$key'"
+            ERR=1
+            HELP=1
+            ;;
+    esac
+    shift
+done
+
+if [ $HELP -eq 1 ]
+then
+    echo "$0 [-vh] - Run django-nose integration tests."
+    echo " -v/--verbose - Print output of test commands."
+    echo " -h/--help    - Print this help message."
+    exit $ERR
+fi
+
+export PYTHONPATH=.
+
+HAS_HOTSHOT=$(python -c "\
+try:
+  import hotshot
+except ImportError:
+  print('0')
+else:
+  print('1')
+")
+
+reset_env() {
+    unset TEST_RUNNER
+    unset NOSE_PLUGINS
+    unset REUSE_DB
+}
+
+echo_output() {
+    STDOUT=$1
+    STDERR=$2
+    if [ $VERBOSE -ne 1 ]
+    then
+        echo "stdout"
+        echo "======"
+        cat $STDOUT
+        echo
+        echo "stderr"
+        echo "======"
+        cat $STDERR
+    fi
+    rm $STDOUT $STDERR
+}
+
+django_test() {
+    COMMAND=$1
+    TEST_COUNT=$2
+    DESCRIPTION=$3
+    CAN_FAIL=${4:-0}
+
+    if [ $VERBOSE -eq 1 ]
+    then
+        echo "================"
+        echo "Django settings:"
+        ./manage.py diffsettings
+        echo "================"
+    fi
+
+    if [ -n "$COVERAGE" ]
+    then
+        TEST="coverage run -p $COMMAND"
+    else
+        TEST="$COMMAND"
+    fi
+    # Temp files on Linux / OSX
+    TMP_OUT=`mktemp 2>/dev/null || mktemp -t 'django-nose-runtests'`
+    TMP_ERR=`mktemp 2>/dev/null || mktemp -t 'django-nose-runtests'`
+    RETURN=0
+    if [ $VERBOSE -eq 1 ]
+    then
+        echo $TEST
+        $TEST > >(tee $TMP_OUT) 2> >(tee $TMP_ERR >&2)
+    else
+        $TEST >$TMP_OUT 2>$TMP_ERR
+    fi
+    if [ $? -gt 0 ]
+    then
+        echo "FAIL (test failure): $DESCRIPTION"
+        echo_output $TMP_OUT $TMP_ERR
+        if [ "$CAN_FAIL" == "0" ]
+        then
+            exit 1
+        else
+            return
+        fi
+    fi
+    OUTPUT=`cat $TMP_OUT $TMP_ERR`
+    echo $OUTPUT | grep "Ran $TEST_COUNT test" > /dev/null
+    if [ $? -gt 0 ]
+    then
+        echo "FAIL (count!=$TEST_COUNT): $DESCRIPTION"
+        echo_output $TMP_OUT $TMP_ERR
+        if [ "$CAN_FAIL" == "0" ]
+        then
+            exit 1
+        else
+            return
+        fi
+    else
+        echo "PASS (count==$TEST_COUNT): $DESCRIPTION"
+    fi
+    rm $TMP_OUT $TMP_ERR
+
+    # Check that we're hijacking the help correctly.
+    $TEST --help 2>&1 | grep 'NOSE_DETAILED_ERRORS' > /dev/null
+    if [ $? -gt 0 ]
+    then
+        echo "FAIL (--help): $DESCRIPTION"
+        if [ "$CAN_FAIL" == 0 ]
+        then
+            exit 1;
+        else
+            return
+        fi
+    else
+        echo "PASS (  --help): $DESCRIPTION"
+    fi
+}
+
+TESTAPP_COUNT=6
+
+reset_env
+django_test "./manage.py test $NOINPUT" $TESTAPP_COUNT 'normal settings'
+
+reset_env
+export TEST_RUNNER="django_nose.NoseTestSuiteRunner"
+django_test "./manage.py test $NOINPUT" $TESTAPP_COUNT 'test runner from environment'
+
+reset_env
+django_test "testapp/runtests.py testapp.test_only_this" 1 'via run_tests API'
+
+reset_env
+export NOSE_PLUGINS="testapp.plugins.SanityCheckPlugin"
+django_test "./manage.py test testapp/plugin_t $NOINPUT" 1 'with plugins'
+
+reset_env
+django_test "./manage.py test unittests $NOINPUT" 4 'unittests'
+
+reset_env
+django_test "./manage.py test unittests --verbosity 1 $NOINPUT" 4 'argument option without equals'
+
+reset_env
+django_test "./manage.py test unittests --nose-verbosity=2 $NOINPUT" 4 'argument with equals'
+
+reset_env
+django_test "./manage.py test unittests --testrunner=testapp.custom_runner.CustomNoseTestSuiteRunner $NOINPUT" 4 'unittests with testrunner'
+
+reset_env
+django_test "./manage.py test unittests --attr special $NOINPUT" 1 'select by attribute'
+
+reset_env
+export REUSE_DB=1
+# For the many issues with REUSE_DB=1, see:
+# https://github.com/django-nose/django-nose/milestones/Fix%20REUSE_DB=1
+django_test "./manage.py test $NOINPUT" $TESTAPP_COUNT 'with REUSE_DB=1, call #1' 'can fail'
+django_test "./manage.py test $NOINPUT" $TESTAPP_COUNT 'with REUSE_DB=1, call #2' 'can fail'
+
+
+if [ "$HAS_HOTSHOT" = "1" ]
+then
+    # Python 3 doesn't support the hotshot profiler. See nose#842.
+    reset_env
+    django_test "./manage.py test $NOINPUT --with-profile --profile-restrict less_output" $TESTAPP_COUNT 'with profile plugin'
+fi

+ 23 - 0
desktop/core/ext-py/django-nose-1.4.5/setup.cfg

@@ -0,0 +1,23 @@
+[check-manifest]
+ignore = 
+	.travis.yml
+	tox.ini
+
+[coverage:run]
+branch = True
+source = django_nose,testapp,unittests
+
+[coverage:report]
+omit = 
+	testapp/migrations/*.py
+
+[flake8]
+exclude = .tox/*,build/*
+
+[wheel]
+universal = 1
+
+[egg_info]
+tag_build = 
+tag_date = 0
+

+ 39 - 7
desktop/core/ext-py/django-nose-1.3/setup.py → desktop/core/ext-py/django-nose-1.4.5/setup.py

@@ -1,14 +1,45 @@
+"""django-nose packaging."""
+from __future__ import unicode_literals
 import os
+from codecs import open
 from setuptools import setup, find_packages
 
 
-ROOT = os.path.abspath(os.path.dirname(__file__))
+def get_long_description(title):
+    """Create the long_description from other files."""
+    ROOT = os.path.abspath(os.path.dirname(__file__))
+
+    readme = open(os.path.join(ROOT, 'README.rst'), 'r', 'utf8').read()
+    body_tag = ".. Omit badges from docs"
+    readme_body_start = readme.index(body_tag)
+    assert readme_body_start
+    readme_body = readme[readme_body_start + len(body_tag):]
+
+    changelog = open(os.path.join(ROOT, 'changelog.rst'), 'r', 'utf8').read()
+    old_tag = ".. Omit older changes from package"
+    changelog_body_end = changelog.index(old_tag)
+    assert changelog_body_end
+    changelog_body = changelog[:changelog_body_end]
+
+    bars = '=' * len(title)
+    long_description = """
+%(bars)s
+%(title)s
+%(bars)s
+%(readme_body)s
+
+%(changelog_body)s
+
+_(Older changes can be found in the full documentation)._
+""" % locals()
+    return long_description
+
 
 setup(
     name='django-nose',
-    version='1.3',
+    version='1.4.5',
     description='Makes your Django tests simple and snappy',
-    long_description=open(os.path.join(ROOT, 'README.rst')).read(),
+    long_description=get_long_description('django-nose'),
     author='Jeff Balogh',
     author_email='me@jeffbalogh.org',
     maintainer='Erik Rose',
@@ -18,18 +49,19 @@ setup(
     packages=find_packages(exclude=['testapp', 'testapp/*']),
     include_package_data=True,
     zip_safe=False,
-    install_requires=['nose>=1.2.1', 'Django>=1.4'],
-    tests_require=['south>=0.7'],
+    install_requires=['nose>=1.2.1'],
+    test_suite='testapp.runtests.runtests',
     # This blows up tox runs that install django-nose into a virtualenv,
     # because it causes Nose to import django_nose.runner before the Django
     # settings are initialized, leading to a mess of errors. There's no reason
     # we need FixtureBundlingPlugin declared as an entrypoint anyway, since you
     # need to be using django-nose to find the it useful, and django-nose knows
     # about it intrinsically.
-    #entry_points="""
+    # entry_points="""
     #    [nose.plugins.0.10]
     #    fixture_bundler = django_nose.fixture_bundling:FixtureBundlingPlugin
     #    """,
+    keywords='django nose django-nose',
     classifiers=[
         'Development Status :: 5 - Production/Stable',
         'Environment :: Web Environment',
@@ -42,8 +74,8 @@ setup(
         'Programming Language :: Python :: 2.6',
         'Programming Language :: Python :: 2.7',
         'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3.3',
         'Programming Language :: Python :: 3.4',
+        'Programming Language :: Python :: 3.5',
         'Topic :: Software Development :: Testing'
     ]
 )

+ 1 - 0
desktop/core/ext-py/django-nose-1.4.5/testapp/__init__.py

@@ -0,0 +1 @@
+"""Sample Django application for django-nose testing."""

+ 6 - 0
desktop/core/ext-py/django-nose-1.4.5/testapp/custom_runner.py

@@ -0,0 +1,6 @@
+"""Custom runner to test overriding runner."""
+from django_nose import NoseTestSuiteRunner
+
+
+class CustomNoseTestSuiteRunner(NoseTestSuiteRunner):
+    """Custom test runner, to test overring runner."""

+ 19 - 0
desktop/core/ext-py/django-nose-1.4.5/testapp/fixtures/testdata.json

@@ -0,0 +1,19 @@
+[
+{
+  "pk": 1, 
+  "model": "testapp.question", 
+  "fields": {
+    "question_text": "What is your favorite color?", 
+    "pub_date": "1975-04-09T00:00:00"
+  }
+},
+{
+  "pk": 1, 
+  "model": "testapp.choice", 
+  "fields": {
+    "choice_text": "Blue.", 
+    "question": 1, 
+    "votes": 3
+  }
+}
+]

+ 42 - 0
desktop/core/ext-py/django-nose-1.4.5/testapp/migrations/0001_initial.py

@@ -0,0 +1,42 @@
+# -*- coding: utf-8 -*-
+# flake8: noqa
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+    ]
+
+    operations = [
+        migrations.CreateModel(
+            name='Choice',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('choice_text', models.CharField(max_length=200)),
+                ('votes', models.IntegerField(default=0)),
+            ],
+            options={
+            },
+            bases=(models.Model,),
+        ),
+        migrations.CreateModel(
+            name='Question',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('question_text', models.CharField(max_length=200)),
+                ('pub_date', models.DateTimeField(verbose_name=b'date published')),
+            ],
+            options={
+            },
+            bases=(models.Model,),
+        ),
+        migrations.AddField(
+            model_name='choice',
+            name='question',
+            field=models.ForeignKey(to='testapp.Question', on_delete=models.CASCADE),
+            preserve_default=True,
+        ),
+    ]

+ 1 - 0
desktop/core/ext-py/django-nose-1.4.5/testapp/migrations/__init__.py

@@ -0,0 +1 @@
+"""Django 1.7+ migrations."""

+ 30 - 0
desktop/core/ext-py/django-nose-1.4.5/testapp/models.py

@@ -0,0 +1,30 @@
+"""Models for django-nose test application.
+
+Based on the Django tutorial:
+https://docs.djangoproject.com/en/1.8/intro/tutorial01/
+"""
+
+from django.db import models
+
+
+class Question(models.Model):
+    """A poll question."""
+
+    question_text = models.CharField(max_length=200)
+    pub_date = models.DateTimeField('date published')
+
+    def __str__(self):
+        """Return string representation."""
+        return self.question_text
+
+
+class Choice(models.Model):
+    """A poll answer."""
+
+    question = models.ForeignKey(Question, on_delete=models.CASCADE)
+    choice_text = models.CharField(max_length=200)
+    votes = models.IntegerField(default=0)
+
+    def __str__(self):
+        """Return string representation."""
+        return self.choice_text

+ 2 - 0
desktop/core/ext-py/django-nose-1.3/testapp/plugin_t/test_with_plugins.py → desktop/core/ext-py/django-nose-1.4.5/testapp/plugin_t/test_with_plugins.py

@@ -1,6 +1,8 @@
+"""Test loading of additional plugins."""
 from nose.tools import eq_
 
 
 def test_one():
+    """Test that the test plugin was initialized."""
     from testapp import plugins
     eq_(plugins.plugin_began, True)

+ 5 - 1
desktop/core/ext-py/django-nose-1.3/testapp/plugins.py → desktop/core/ext-py/django-nose-1.4.5/testapp/plugins.py

@@ -1,9 +1,12 @@
+"""Additional plugins for testing plugins."""
 from nose.plugins import Plugin
 
-
 plugin_began = False
 
+
 class SanityCheckPlugin(Plugin):
+    """Test plugin that registers that it ran."""
+
     enabled = True
 
     def options(self, parser, env):
@@ -13,5 +16,6 @@ class SanityCheckPlugin(Plugin):
         """Configure plugin."""
 
     def begin(self):
+        """Flag that the plugin was run."""
         global plugin_began
         plugin_began = True

+ 5 - 4
desktop/core/ext-py/django-nose-1.3/testapp/runtests.py → desktop/core/ext-py/django-nose-1.4.5/testapp/runtests.py

@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+"""Configure enough Django to run the test suite."""
 import sys
 
 from django.conf import settings
@@ -6,14 +7,14 @@ from django.conf import settings
 if not settings.configured:
     settings.configure(
         DATABASES={'default': {'ENGINE': 'django.db.backends.sqlite3'}},
-        INSTALLED_APPS=[
-            'django_nose',
-        ],
+        INSTALLED_APPS=['django_nose'],
+        MIDDLEWARE_CLASSES=[],
     )
 
-from django_nose import NoseTestSuiteRunner
 
 def runtests(*test_labels):
+    """Run the selected tests, or all tests if none selected."""
+    from django_nose import NoseTestSuiteRunner
     runner = NoseTestSuiteRunner(verbosity=1, interactive=True)
     failures = runner.run_tests(test_labels)
     sys.exit(failures)

+ 47 - 0
desktop/core/ext-py/django-nose-1.4.5/testapp/settings.py

@@ -0,0 +1,47 @@
+"""
+Django settings for testing django-nose.
+
+Configuration is overriden by environment variables:
+
+DATABASE_URL - See https://github.com/kennethreitz/dj-database-url
+USE_SOUTH - Set to 1 to include South in INSTALLED_APPS
+TEST_RUNNER - Dotted path of test runner to use (can also use --test-runner)
+NOSE_PLUGINS - Comma-separated list of plugins to add
+"""
+from __future__ import print_function
+from os import environ, path
+
+import dj_database_url
+
+BASE_DIR = path.dirname(path.dirname(__file__))
+
+
+def rel_path(*subpaths):
+    """Construct the full path given a relative path."""
+    return path.join(BASE_DIR, *subpaths)
+
+
+DATABASES = {
+    'default':
+        dj_database_url.config(
+            default='sqlite:///' + rel_path('testapp.sqlite3'))
+}
+
+MIDDLEWARE_CLASSES = ()
+
+INSTALLED_APPS = [
+    'django_nose',
+    'testapp',
+]
+
+raw_test_runner = environ.get('TEST_RUNNER')
+if raw_test_runner:
+    TEST_RUNNER = raw_test_runner
+else:
+    TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
+
+raw_plugins = environ.get('NOSE_PLUGINS')
+if raw_plugins:
+    NOSE_PLUGINS = raw_plugins.split(',')
+
+SECRET_KEY = 'ssshhhh'

+ 1 - 0
desktop/core/ext-py/django-nose-1.3/testapp/test_for_nose.py → desktop/core/ext-py/django-nose-1.4.5/testapp/test_for_nose.py

@@ -2,4 +2,5 @@
 
 
 def test_addition():
+    """Test some advanced maths."""
     assert 1 + 1 == 2

+ 1 - 0
desktop/core/ext-py/django-nose-1.3/testapp/test_only_this.py → desktop/core/ext-py/django-nose-1.4.5/testapp/test_only_this.py

@@ -2,4 +2,5 @@
 
 
 def test_multiplication():
+    """Check some advanced maths."""
     assert 2 * 2 == 4

+ 50 - 0
desktop/core/ext-py/django-nose-1.4.5/testapp/tests.py

@@ -0,0 +1,50 @@
+"""Django model tests."""
+
+from datetime import datetime
+
+from django.test import TestCase
+from testapp.models import Question, Choice
+
+
+class NoDatabaseTestCase(TestCase):
+    """Tests that don't read or write to the database."""
+
+    def test_question_str(self):
+        """Test Question.__str__ method."""
+        question = Question(question_text="What is your name?")
+        self.assertEqual("What is your name?", str(question))
+
+    def test_choice_str(self):
+        """Test Choice.__str__ method."""
+        choice = Choice(choice_text='My name is Sir Lancelot of Camelot.')
+        self.assertEqual('My name is Sir Lancelot of Camelot.', str(choice))
+
+
+class UsesDatabaseTestCase(TestCase):
+    """Tests that read and write to the database."""
+
+    def test_question(self):
+        """Test that votes is initialized to 0."""
+        question = Question.objects.create(
+            question_text="What is your quest?", pub_date=datetime(1975, 4, 9))
+        Choice.objects.create(
+            question=question, choice_text="To seek the Holy Grail.")
+        self.assertTrue(question.choice_set.exists())
+        the_choice = question.choice_set.get()
+        self.assertEqual(0, the_choice.votes)
+
+
+class UsesFixtureTestCase(TestCase):
+    """Tests that use a test fixture."""
+
+    fixtures = ["testdata.json"]
+
+    def test_fixture_loaded(self):
+        """Test that fixture was loaded."""
+        question = Question.objects.get()
+        self.assertEqual(
+            'What is your favorite color?', question.question_text)
+        self.assertEqual(datetime(1975, 4, 9), question.pub_date)
+        choice = question.choice_set.get()
+        self.assertEqual("Blue.", choice.choice_text)
+        self.assertEqual(3, choice.votes)

+ 83 - 0
desktop/core/ext-py/django-nose-1.4.5/unittests/test_databases.py

@@ -0,0 +1,83 @@
+"""Test database access without a database."""
+from contextlib import contextmanager
+from unittest import TestCase
+
+try:
+    from django.db.models.loading import cache as apps
+except:
+    from django.apps import apps
+
+from nose.plugins.attrib import attr
+from django_nose.runner import NoseTestSuiteRunner
+
+
+class GetModelsForConnectionTests(TestCase):
+    """Test runner._get_models_for_connection."""
+
+    tables = ['test_table%d' % i for i in range(5)]
+
+    def _connection_mock(self, tables):
+        class FakeIntrospection(object):
+            def get_table_list(*args, **kwargs):
+                return tables
+
+        class FakeConnection(object):
+            introspection = FakeIntrospection()
+
+            def cursor(self):
+                return None
+
+        return FakeConnection()
+
+    def _model_mock(self, db_table):
+        class FakeModel(object):
+            _meta = type('meta', (object,), {'db_table': db_table})()
+
+        return FakeModel()
+
+    @contextmanager
+    def _cache_mock(self, tables=[]):
+        def get_models(*args, **kwargs):
+            return [self._model_mock(t) for t in tables]
+
+        old = apps.get_models
+        apps.get_models = get_models
+        yield
+        apps.get_models = old
+
+    def setUp(self):
+        """Initialize the runner."""
+        self.runner = NoseTestSuiteRunner()
+
+    def test_no_models(self):
+        """For a DB with no tables, return nothing."""
+        connection = self._connection_mock([])
+        with self._cache_mock(['table1', 'table2']):
+            self.assertEqual(
+                self.runner._get_models_for_connection(connection), [])
+
+    def test_wrong_models(self):
+        """If no tables exists for models, return nothing."""
+        connection = self._connection_mock(self.tables)
+        with self._cache_mock(['table1', 'table2']):
+            self.assertEqual(
+                self.runner._get_models_for_connection(connection), [])
+
+    @attr("special")
+    def test_some_models(self):
+        """If some of the models are in the DB, return matching models."""
+        connection = self._connection_mock(self.tables)
+        with self._cache_mock(self.tables[1:3]):
+            result_tables = [
+                m._meta.db_table for m in
+                self.runner._get_models_for_connection(connection)]
+        self.assertEqual(result_tables, self.tables[1:3])
+
+    def test_all_models(self):
+        """If all the models have in the DB, return them all."""
+        connection = self._connection_mock(self.tables)
+        with self._cache_mock(self.tables):
+            result_tables = [
+                m._meta.db_table for m in
+                self.runner._get_models_for_connection(connection)]
+        self.assertEqual(result_tables, self.tables)