django-testproject-0.1.3/ 0000755 0001750 0001750 00000000000 12752617102 015224 5 ustar neil neil 0000000 0000000 django-testproject-0.1.3/setup.cfg 0000644 0001750 0001750 00000000177 12752617102 017052 0 ustar neil neil 0000000 0000000 [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/.gitreview 0000644 0001750 0001750 00000000113 12752603124 017224 0 ustar neil neil 0000000 0000000 [gerrit]
host=review.linaro.org
port=29418
project=lava/django-testproject
django-testproject-0.1.3/django_testproject/ 0000755 0001750 0001750 00000000000 12752617102 021114 5 ustar neil neil 0000000 0000000 django-testproject-0.1.3/django_testproject/templates/ 0000755 0001750 0001750 00000000000 12752617102 023112 5 ustar neil neil 0000000 0000000 django-testproject-0.1.3/django_testproject/templates/django_testproject/ 0000755 0001750 0001750 00000000000 12752617102 027002 5 ustar neil neil 0000000 0000000 django-testproject-0.1.3/django_testproject/templates/django_testproject/base.html 0000644 0001750 0001750 00000000733 12243661674 030615 0 ustar neil neil 0000000 0000000
{% block title %}{% endblock %}
{% block content %}{% endblock %}
django-testproject-0.1.3/django_testproject/templates/404.html 0000644 0001750 0001750 00000000000 12243661674 024305 0 ustar neil neil 0000000 0000000 django-testproject-0.1.3/django_testproject/templates/registration/ 0000755 0001750 0001750 00000000000 12752617102 025624 5 ustar neil neil 0000000 0000000 django-testproject-0.1.3/django_testproject/templates/registration/login.html 0000644 0001750 0001750 00000001127 12243661674 027633 0 ustar neil neil 0000000 0000000 {% 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 %}
{% endblock %}
django-testproject-0.1.3/django_testproject/templates/registration/base.html 0000644 0001750 0001750 00000000141 12243661674 027430 0 ustar neil neil 0000000 0000000 {% extends "django_testproject/base.html" %}
{% block title %}Account management{% endblock %}
django-testproject-0.1.3/django_testproject/templates/registration/logged_out.html 0000644 0001750 0001750 00000000103 12243661674 030644 0 ustar neil neil 0000000 0000000 {% block content %}
You have been signed out
{% endblock %}
django-testproject-0.1.3/django_testproject/templates/500.html 0000644 0001750 0001750 00000000000 12243661674 024302 0 ustar neil neil 0000000 0000000 django-testproject-0.1.3/django_testproject/__init__.py 0000644 0001750 0001750 00000000000 12326241101 023200 0 ustar neil neil 0000000 0000000 django-testproject-0.1.3/django_testproject/settings.py 0000644 0001750 0001750 00000010411 12752603252 023324 0 ustar neil neil 0000000 0000000 # 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.py 0000644 0001750 0001750 00000004156 12752603127 022640 0 ustar neil neil 0000000 0000000 # 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-INFO 0000644 0001750 0001750 00000001506 12752617102 016323 0 ustar neil neil 0000000 0000000 Metadata-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/COPYING 0000644 0001750 0001750 00000016727 12243661674 016304 0 ustar neil neil 0000000 0000000 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.py 0000755 0001750 0001750 00000003416 12752603267 016754 0 ustar neil neil 0000000 0000000 #!/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/ 0000755 0001750 0001750 00000000000 12752617102 022606 5 ustar neil neil 0000000 0000000 django-testproject-0.1.3/django_testproject.egg-info/PKG-INFO 0000644 0001750 0001750 00000001506 12752617102 023705 0 ustar neil neil 0000000 0000000 Metadata-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.txt 0000644 0001750 0001750 00000001265 12752617102 024476 0 ustar neil neil 0000000 0000000 .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.html django-testproject-0.1.3/django_testproject.egg-info/top_level.txt 0000644 0001750 0001750 00000000023 12752617102 025333 0 ustar neil neil 0000000 0000000 django_testproject
django-testproject-0.1.3/django_testproject.egg-info/dependency_links.txt 0000644 0001750 0001750 00000000001 12752617102 026654 0 ustar neil neil 0000000 0000000
django-testproject-0.1.3/django_testproject.egg-info/zip-safe 0000644 0001750 0001750 00000000001 12326243324 024234 0 ustar neil neil 0000000 0000000
django-testproject-0.1.3/django_testproject.egg-info/requires.txt 0000644 0001750 0001750 00000000016 12752617102 025203 0 ustar neil neil 0000000 0000000 django >= 1.5
django-testproject-0.1.3/MANIFEST.in 0000644 0001750 0001750 00000000107 12243661674 016770 0 ustar neil neil 0000000 0000000 include COPYING
recursive-include django_testproject/templates *.html
django-testproject-0.1.3/.gitignore 0000644 0001750 0001750 00000000042 12326235444 017212 0 ustar neil neil 0000000 0000000 *.egg
*.egg-info
build
dist
*.pyc