django-testproject-0.1.3/0000755000175000017500000000000012752617102015224 5ustar neilneil00000000000000django-testproject-0.1.3/setup.cfg0000644000175000017500000000017712752617102017052 0ustar neilneil00000000000000[upload_docs] upload-dir = build/sphinx/html [upload] sign = True [egg_info] tag_build = tag_date = 0 tag_svn_revision = 0 django-testproject-0.1.3/.gitreview0000644000175000017500000000011312752603124017224 0ustar neilneil00000000000000[gerrit] host=review.linaro.org port=29418 project=lava/django-testproject django-testproject-0.1.3/django_testproject/0000755000175000017500000000000012752617102021114 5ustar neilneil00000000000000django-testproject-0.1.3/django_testproject/templates/0000755000175000017500000000000012752617102023112 5ustar neilneil00000000000000django-testproject-0.1.3/django_testproject/templates/django_testproject/0000755000175000017500000000000012752617102027002 5ustar neilneil00000000000000django-testproject-0.1.3/django_testproject/templates/django_testproject/base.html0000644000175000017500000000073312243661674030615 0ustar neilneil00000000000000 {% block title %}{% endblock %} {% block content %}{% endblock %} django-testproject-0.1.3/django_testproject/templates/404.html0000644000175000017500000000000012243661674024305 0ustar neilneil00000000000000django-testproject-0.1.3/django_testproject/templates/registration/0000755000175000017500000000000012752617102025624 5ustar neilneil00000000000000django-testproject-0.1.3/django_testproject/templates/registration/login.html0000644000175000017500000000112712243661674027633 0ustar neilneil00000000000000{% extends "registration/base.html" %} {% block title %}{{block.super }} | Sign in {% endblock %} {% block header %} {% if next %}

You need to sign-in to access that page

{% else %}

Sign in

{% endif %} {% endblock %} {% block content %}
{% csrf_token %}

{{ form.username }}

{{ form.password }}

{{ form.errors }}
{% endblock %} django-testproject-0.1.3/django_testproject/templates/registration/base.html0000644000175000017500000000014112243661674027430 0ustar neilneil00000000000000{% extends "django_testproject/base.html" %} {% block title %}Account management{% endblock %} django-testproject-0.1.3/django_testproject/templates/registration/logged_out.html0000644000175000017500000000010312243661674030644 0ustar neilneil00000000000000{% block content %}

You have been signed out

{% endblock %} django-testproject-0.1.3/django_testproject/templates/500.html0000644000175000017500000000000012243661674024302 0ustar neilneil00000000000000django-testproject-0.1.3/django_testproject/__init__.py0000644000175000017500000000000012326241101023200 0ustar neilneil00000000000000django-testproject-0.1.3/django_testproject/settings.py0000644000175000017500000001041112752603252023324 0ustar neilneil00000000000000# Copyright (C) 2010, 2011 Linaro Limited # # Author: Zygmunt Krynicki # # This file is part of django-testproject. # # django-testproject is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version 3 # as published by the Free Software Foundation # # django-testproject is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with django-testproject. If not, see . """ Settings generator for test projects """ import inspect import os DJANGO_TESTPROJECT_DIR = os.path.abspath(os.path.dirname(__file__)) def _get_default_settings(project_dir): """ Produce default settings """ DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( #( 'Your name', 'email@example.org'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(project_dir, 'test.db') } } TIME_ZONE = 'UTC' LANGUAGE_CODE = 'en-us' SITE_ID = 1 USE_I18N = True USE_L10N = True MEDIA_ROOT = '' MEDIA_URL = '' STATIC_ROOT = '' STATIC_URL = '/static/' STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', ) SECRET_KEY = '00000000000000000000000000000000000000000000000000' TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', ) TEMPLATE_DIRS = ( os.path.join(project_dir, "templates"), os.path.join(DJANGO_TESTPROJECT_DIR, "templates") ) ROOT_URLCONF = '' MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', ) TEMPLATE_CONTEXT_PROCESSORS = ( "django.contrib.auth.context_processors.auth", "django.core.context_processors.debug", "django.core.context_processors.i18n", "django.core.context_processors.media", "django.contrib.messages.context_processors.messages") return locals() def gen_settings(**kwargs): """ Generate settings for test project The settings will work for django 1.1.x and 1.2.x You may provide any additional settings with keyword arguments, they will be merged with generated settings. """ # Find project_dir by inspecting caller frame = inspect.currentframe() outer_frames = inspect.getouterframes(frame) caller = outer_frames[1][0] project_dir = os.path.dirname( os.path.abspath( inspect.getsourcefile(caller))) # Default settings settings = _get_default_settings(project_dir) # Merge with user provided defaults for key, value in kwargs.items(): if key not in settings: new_value = value elif isinstance(settings[key], (list, tuple)) and isinstance(value, (list, tuple)): # Merge lists new_value = list(settings[key]) + list(value) elif isinstance(settings[key], (int, float, bool, str)) and isinstance(value, (int, float, bool, str)): # Overwrite simple types new_value = value else: raise ValueError("Don't know how to merge custom setting %r that already exists in generated settings" % key) settings[key] = new_value # Crude django_coverage integration try: import django_coverage settings['INSTALLED_APPS'].insert(0, 'django_coverage') settings['COVERAGE_REPORT_HTML_OUTPUT_DIR'] = os.getenv("COVERAGE_REPORT_HTML_OUTPUT_DIR") settings['COVERAGE_MODULE_EXCLUDES'] = [] except ImportError: pass # Return settings back to the caller return settings django-testproject-0.1.3/django_testproject/tests.py0000644000175000017500000000415612752603127022640 0ustar neilneil00000000000000# Copyright (C) 2010, 2011 Linaro Limited # # Author: Zygmunt Krynicki # # This file is part of django-testproject. # # django-testproject is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version 3 # as published by the Free Software Foundation # # django-testproject is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with django-testproject. If not, see . """ Helper function for running tests via setup.py test """ import os import sys from django.conf import settings from django.test.utils import get_runner def run_tests_for(settings_module_name, test_last_n_apps=-1): """ Helper function that simplifies testing Django applications via setup.py test The idea is to test your application in a small test project. Since not everything in your project is relevant (you don't want to test django.contrib.auth gazillion times just because you use it in your application) run_tests allows you to run just a subset of applications. By default last item in INSTALLED_APPLICATIONS is tested. You can change it by calling run_tests() with different argument. If you really want to test all applications just pass None as test_last_n_apps. """ os.environ['DJANGO_SETTINGS_MODULE'] = settings_module_name if test_last_n_apps is None: test_labels = None else: test_labels = settings.INSTALLED_APPS[test_last_n_apps:] runner_cls = get_runner(settings) runner = runner_cls(verbosity=2, interactive=False).run_tests failures = runner(test_labels) sys.exit(failures) def run_tests(test_last_n_apps=-1): """ Like run_tests_for but assumes that settings_module_name is "test_project.settings" """ return run_tests_for("test_project.settings", test_last_n_apps) django-testproject-0.1.3/PKG-INFO0000644000175000017500000000150612752617102016323 0ustar neilneil00000000000000Metadata-Version: 1.1 Name: django-testproject Version: 0.1.3 Summary: Universal project for running unit tests of Django applications Home-page: https://git.linaro.org/lava/django-testproject.git Author: Linaro Limited Author-email: lava-team@linaro.org License: LGPLv3 Description: UNKNOWN Keywords: django,testing Platform: UNKNOWN Classifier: Development Status :: 4 - Beta Classifier: Environment :: Web Environment Classifier: Framework :: Django Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL) Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Topic :: Software Development :: Testing django-testproject-0.1.3/COPYING0000644000175000017500000001672712243661674016304 0ustar neilneil00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. django-testproject-0.1.3/setup.py0000755000175000017500000000341612752603267016754 0ustar neilneil00000000000000#!/usr/bin/env python # Copyright (C) 2010 Linaro Limited # # Author: Zygmunt Krynicki # # This file is part of django-testproject. # # django-testproject is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version 3 # as published by the Free Software Foundation # # django-testproject is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with django-testproject. If not, see . from setuptools import setup setup( name='django-testproject', version="0.1.3", author="Linaro Limited", author_email="lava-team@linaro.org", description="Universal project for running unit tests of Django applications", url='https://git.linaro.org/lava/django-testproject.git', license='LGPLv3', keywords=['django', 'testing'], classifiers=[ "Development Status :: 4 - Beta", 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Testing", ], zip_safe=True, packages=[ 'django_testproject', ], install_requires=[ 'django >= 1.5', ], include_package_data=True, ) django-testproject-0.1.3/django_testproject.egg-info/0000755000175000017500000000000012752617102022606 5ustar neilneil00000000000000django-testproject-0.1.3/django_testproject.egg-info/PKG-INFO0000644000175000017500000000150612752617102023705 0ustar neilneil00000000000000Metadata-Version: 1.1 Name: django-testproject Version: 0.1.3 Summary: Universal project for running unit tests of Django applications Home-page: https://git.linaro.org/lava/django-testproject.git Author: Linaro Limited Author-email: lava-team@linaro.org License: LGPLv3 Description: UNKNOWN Keywords: django,testing Platform: UNKNOWN Classifier: Development Status :: 4 - Beta Classifier: Environment :: Web Environment Classifier: Framework :: Django Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL) Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Topic :: Software Development :: Testing django-testproject-0.1.3/django_testproject.egg-info/SOURCES.txt0000644000175000017500000000126512752617102024476 0ustar neilneil00000000000000.gitignore .gitreview COPYING MANIFEST.in setup.cfg setup.py django_testproject/__init__.py django_testproject/settings.py django_testproject/tests.py django_testproject.egg-info/PKG-INFO django_testproject.egg-info/SOURCES.txt django_testproject.egg-info/dependency_links.txt django_testproject.egg-info/requires.txt django_testproject.egg-info/top_level.txt django_testproject.egg-info/zip-safe django_testproject/templates/404.html django_testproject/templates/500.html django_testproject/templates/django_testproject/base.html django_testproject/templates/registration/base.html django_testproject/templates/registration/logged_out.html django_testproject/templates/registration/login.htmldjango-testproject-0.1.3/django_testproject.egg-info/top_level.txt0000644000175000017500000000002312752617102025333 0ustar neilneil00000000000000django_testproject django-testproject-0.1.3/django_testproject.egg-info/dependency_links.txt0000644000175000017500000000000112752617102026654 0ustar neilneil00000000000000 django-testproject-0.1.3/django_testproject.egg-info/zip-safe0000644000175000017500000000000112326243324024234 0ustar neilneil00000000000000 django-testproject-0.1.3/django_testproject.egg-info/requires.txt0000644000175000017500000000001612752617102025203 0ustar neilneil00000000000000django >= 1.5 django-testproject-0.1.3/MANIFEST.in0000644000175000017500000000010712243661674016770 0ustar neilneil00000000000000include COPYING recursive-include django_testproject/templates *.html django-testproject-0.1.3/.gitignore0000644000175000017500000000004212326235444017212 0ustar neilneil00000000000000*.egg *.egg-info build dist *.pyc