id int64 0 458k | file_name stringlengths 4 119 | file_path stringlengths 14 227 | content stringlengths 24 9.96M | size int64 24 9.96M | language stringclasses 1
value | extension stringclasses 14
values | total_lines int64 1 219k | avg_line_length float64 2.52 4.63M | max_line_length int64 5 9.91M | alphanum_fraction float64 0 1 | repo_name stringlengths 7 101 | repo_stars int64 100 139k | repo_forks int64 0 26.4k | repo_open_issues int64 0 2.27k | repo_license stringclasses 12
values | repo_extraction_date stringclasses 433
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1,700 | test_step_runner.py | gabrielfalcao_lettuce/tests/unit/test_step_runner.py | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012> Gabriel Falc√£o <gabriel@nacaolivre.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundati... | 17,647 | Python | .py | 418 | 37.38756 | 149 | 0.72072 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,701 | test_core.py | gabrielfalcao_lettuce/tests/unit/test_core.py | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012> Gabriel Falcão <gabriel@nacaolivre.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundatio... | 6,455 | Python | .py | 167 | 33.107784 | 83 | 0.647474 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,702 | test_language.py | gabrielfalcao_lettuce/tests/unit/test_language.py | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012> Gabriel Falc√£o <gabriel@nacaolivre.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundati... | 2,142 | Python | .py | 41 | 48.853659 | 89 | 0.729794 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,703 | test_server.py | gabrielfalcao_lettuce/tests/unit/test_server.py | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012> Gabriel Falc√£o <gabriel@nacaolivre.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundati... | 1,228 | Python | .py | 31 | 37.387097 | 71 | 0.759026 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,704 | test_strings.py | gabrielfalcao_lettuce/tests/unit/test_strings.py | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012> Gabriel Falcão <gabriel@nacaolivre.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundatio... | 8,348 | Python | .py | 272 | 23.577206 | 78 | 0.55956 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,705 | test_language_ru.py | gabrielfalcao_lettuce/tests/unit/test_language_ru.py | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012> Gabriel Falcão <gabriel@nacaolivre.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundatio... | 5,556 | Python | .py | 117 | 32.487179 | 82 | 0.653972 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,706 | test_file_system.py | gabrielfalcao_lettuce/tests/unit/test_file_system.py | # -*- coding: utf-8 -*-
import sys
from StringIO import StringIO
from mox import Mox
from nose.tools import assert_equals
from nose.tools import assert_raises
from lettuce import fs as io
def test_has_a_stack_list():
"FileSystem stack list"
assert hasattr(io.FileSystem, 'stack'), \
'FileSystem shoul... | 10,824 | Python | .py | 330 | 26.190909 | 79 | 0.633516 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,707 | test_feature_parser.py | gabrielfalcao_lettuce/tests/unit/test_feature_parser.py | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012> Gabriel Falc√£o <gabriel@nacaolivre.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundati... | 27,405 | Python | .py | 694 | 33.456772 | 84 | 0.656408 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,708 | test_registry.py | gabrielfalcao_lettuce/tests/unit/test_registry.py | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012> Gabriel Falc√£o <gabriel@nacaolivre.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundati... | 4,903 | Python | .py | 114 | 37.491228 | 90 | 0.700797 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,709 | manage.py | gabrielfalcao_lettuce/tests/unit/django/coconut/manage.py | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "coconut.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| 250 | Python | .py | 7 | 32.571429 | 71 | 0.7375 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,710 | settings.py | gabrielfalcao_lettuce/tests/unit/django/coconut/coconut/settings.py | # Django settings for coconut project.
DEBUG = True
ROOT_URLCONF = 'coconut.urls'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': '', # Or path to database file if using sqlite3.
'U... | 730 | Python | .py | 18 | 35.833333 | 108 | 0.535966 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,711 | urls.py | gabrielfalcao_lettuce/tests/unit/django/coconut/coconut/urls.py | from django.conf.urls import patterns, include, url
from .views import WaitView
urlpatterns = patterns('',
url(r'^$', WaitView.as_view(), name='home'),
)
| 159 | Python | .py | 5 | 29.8 | 51 | 0.718954 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,712 | wsgi.py | gabrielfalcao_lettuce/tests/unit/django/coconut/coconut/wsgi.py | """
WSGI config for coconut project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION`` ... | 1,136 | Python | .py | 22 | 50.363636 | 79 | 0.820397 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,713 | views.py | gabrielfalcao_lettuce/tests/unit/django/coconut/coconut/views.py |
import time
from django.views.generic import View
from django.http import HttpResponse
class WaitView(View):
def get(self, *args, **kwargs):
time.sleep(3)
return HttpResponse("OK")
| 204 | Python | .py | 7 | 24.857143 | 37 | 0.726804 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,714 | threading_server.py | gabrielfalcao_lettuce/tests/unit/django/coconut/coconut/features/threading_server.py | # -*- coding: utf-8 -*-
import urllib
import time
from lettuce import step
from lettuce.django import django_url
from threading import Thread, activeCount
from nose.tools import *
class ThreadUrlVisit(Thread):
def __init__(self, url):
super(ThreadUrlVisit, self).__init__()
self.url = dja... | 1,666 | Python | .py | 44 | 31.704545 | 71 | 0.674286 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,715 | test_alfaces.py | gabrielfalcao_lettuce/tests/integration/test_alfaces.py | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012> Gabriel Falc√£o <gabriel@nacaolivre.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundati... | 9,792 | Python | .py | 204 | 42.313725 | 90 | 0.702691 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,716 | test_brocolis.py | gabrielfalcao_lettuce/tests/integration/test_brocolis.py | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012> Gabriel Falc√£o <gabriel@nacaolivre.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundati... | 2,167 | Python | .py | 43 | 47.581395 | 108 | 0.750711 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,717 | test_bamboo.py | gabrielfalcao_lettuce/tests/integration/test_bamboo.py | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012> Gabriel Falc√£o <gabriel@nacaolivre.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundati... | 2,162 | Python | .py | 46 | 44 | 71 | 0.73289 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,718 | test_couves.py | gabrielfalcao_lettuce/tests/integration/test_couves.py | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012> Gabriel Falc√£o <gabriel@nacaolivre.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundati... | 1,602 | Python | .py | 33 | 46.30303 | 80 | 0.755128 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,719 | test_dill.py | gabrielfalcao_lettuce/tests/integration/test_dill.py | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012> Gabriel Falc√£o <gabriel@nacaolivre.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundati... | 3,802 | Python | .py | 80 | 42.925 | 78 | 0.698811 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,720 | test_cucumber.py | gabrielfalcao_lettuce/tests/integration/test_cucumber.py | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012> Gabriel Falc√£o <gabriel@nacaolivre.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundati... | 1,175 | Python | .py | 26 | 43.346154 | 71 | 0.768154 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,721 | __init__.py | gabrielfalcao_lettuce/tests/integration/__init__.py | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012> Gabriel Falc√£o <gabriel@nacaolivre.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundati... | 784 | Python | .py | 16 | 48 | 71 | 0.765625 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,722 | test_grocery.py | gabrielfalcao_lettuce/tests/integration/test_grocery.py | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012> Gabriel Falc√£o <gabriel@nacaolivre.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundati... | 4,149 | Python | .py | 86 | 43.848837 | 80 | 0.702776 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,723 | test_kale.py | gabrielfalcao_lettuce/tests/integration/test_kale.py | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012> Gabriel Falc√£o <gabriel@nacaolivre.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundati... | 1,212 | Python | .py | 26 | 44.961538 | 71 | 0.77138 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,724 | test_chive.py | gabrielfalcao_lettuce/tests/integration/test_chive.py | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012> Gabriel Falc√£o <gabriel@nacaolivre.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundati... | 1,774 | Python | .py | 39 | 42.615385 | 77 | 0.743902 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,725 | test_celeries.py | gabrielfalcao_lettuce/tests/integration/test_celeries.py | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012> Gabriel Falc√£o <gabriel@nacaolivre.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundati... | 2,164 | Python | .py | 39 | 52.641026 | 95 | 0.754842 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,726 | test_rucola.py | gabrielfalcao_lettuce/tests/integration/test_rucola.py | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012> Gabriel Falc√£o <gabriel@nacaolivre.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundati... | 1,194 | Python | .py | 26 | 44.346154 | 71 | 0.772532 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,727 | setup.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/setup.py | from distutils.core import setup
from distutils.command.install_data import install_data
from distutils.command.install import INSTALL_SCHEMES
import os
import sys
class osx_install_data(install_data):
# On MacOS, the platform-specific lib dir is /System/Library/Framework/Python/.../
# which is wrong. Python 2... | 4,325 | Python | .py | 92 | 39.945652 | 117 | 0.650012 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,728 | csrf_migration_helper.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/extras/csrf_migration_helper.py | #!/usr/bin/env python
# This script aims to help developers locate forms and view code that needs to
# use the new CSRF protection in Django 1.2. It tries to find all the code that
# may need the steps described in the CSRF documentation. It does not modify
# any code directly, it merely attempts to locate it. Deve... | 13,030 | Python | .py | 318 | 34.525157 | 146 | 0.645745 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,729 | conf.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/docs/conf.py | # -*- coding: utf-8 -*-
#
# Django documentation build configuration file, created by
# sphinx-quickstart on Thu Mar 27 09:06:53 2008.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pickleab... | 8,707 | Python | .py | 196 | 43.005102 | 85 | 0.734297 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,730 | djangodocs.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/docs/_ext/djangodocs.py | """
Sphinx plugins for Django documentation.
"""
import os
import re
from docutils import nodes, transforms
try:
import json
except ImportError:
try:
import simplejson as json
except ImportError:
try:
from django.utils import simplejson as json
except ImportError:
... | 8,377 | Python | .py | 221 | 30.176471 | 110 | 0.619633 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,731 | literals_to_xrefs.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/docs/_ext/literals_to_xrefs.py | """
Runs through a reST file looking for old-style literals, and helps replace them
with new-style references.
"""
import re
import sys
import shelve
refre = re.compile(r'``([^`\s]+?)``')
ROLES = (
'attr',
'class',
"djadmin",
'data',
'exc',
'file',
'func',
'lookup',
'meth',
'm... | 4,814 | Python | .py | 141 | 26.120567 | 93 | 0.555727 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,732 | applyxrefs.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/docs/_ext/applyxrefs.py | """Adds xref targets to the top of files."""
import sys
import os
testing = False
DONT_TOUCH = (
'./index.txt',
)
def target_name(fn):
if fn.endswith('.txt'):
fn = fn[:-4]
return '_' + fn.lstrip('./').replace('/', '-')
def process_file(fn, lines):
lines.insert(0, '\n')
lines... | 2,148 | Python | .py | 75 | 21.346667 | 75 | 0.533721 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,733 | modpython.txt | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/docs/howto/deployment/modpython.txt | ============================================
How to use Django with Apache and mod_python
============================================
.. warning::
Support for mod_python has been deprecated, and will be removed in
Django 1.5. If you are configuring a new deployment, you are
strongly encouraged to conside... | 17,253 | Python | .py | 312 | 52.092949 | 103 | 0.743454 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,734 | urls.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/urls.py | from django.conf.urls.defaults import *
urlpatterns = patterns('',
# test_client modeltest urls
(r'^test_client/', include('modeltests.test_client.urls')),
(r'^test_client_regress/', include('regressiontests.test_client_regress.urls')),
# File upload test views
(r'^file_uploads/', include('regres... | 1,748 | Python | .py | 33 | 47.878788 | 95 | 0.706471 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,735 | test_sqlite.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/test_sqlite.py | # This is an example test settings file for use with the Django test suite.
#
# The 'sqlite3' backend requires only the ENGINE setting (an in-
# memory database will be used). All other backends will require a
# NAME and potentially authentication information. See the
# following section in the docs for more informatio... | 835 | Python | .py | 21 | 37.190476 | 76 | 0.751538 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,736 | runtests.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/runtests.py | #!/usr/bin/env python
import os, subprocess, sys
import django.contrib as contrib
from django.utils import unittest
CONTRIB_DIR_NAME = 'django.contrib'
MODEL_TESTS_DIR_NAME = 'modeltests'
REGRESSION_TESTS_DIR_NAME = 'regressiontests'
TEST_TEMPLATE_DIR = 'templates'
CONTRIB_DIR = os.path.dirname(contrib.__file__)
MO... | 13,950 | Python | .py | 290 | 40.306897 | 161 | 0.659124 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,737 | urls.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/test_utils/urls.py | from django.conf.urls.defaults import patterns
import views
urlpatterns = patterns('',
(r'^get_person/(\d+)/$', views.get_person),
)
| 140 | Python | .py | 5 | 25.6 | 47 | 0.719697 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,738 | tests.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/test_utils/tests.py | import sys
from django.test import TestCase, skipUnlessDBFeature, skipIfDBFeature
from models import Person
if sys.version_info >= (2, 5):
from tests_25 import AssertNumQueriesContextManagerTests
class SkippingTestCase(TestCase):
def test_skip_unless_db_feature(self):
"A test that might be skipped ... | 4,833 | Python | .py | 117 | 36.222222 | 119 | 0.633917 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,739 | tests_25.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/test_utils/tests_25.py | from __future__ import with_statement
from django.test import TestCase
from models import Person
class AssertNumQueriesContextManagerTests(TestCase):
def test_simple(self):
with self.assertNumQueries(0):
pass
with self.assertNumQueries(1):
Person.objects.count()
... | 1,281 | Python | .py | 29 | 34.344828 | 80 | 0.642742 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,740 | views.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/test_utils/views.py | from django.http import HttpResponse
from django.shortcuts import get_object_or_404
from models import Person
def get_person(request, pk):
person = get_object_or_404(Person, pk=pk)
return HttpResponse(person.name) | 222 | Python | .py | 6 | 34.666667 | 46 | 0.796296 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,741 | models.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/syndication/models.py | from django.db import models
class Entry(models.Model):
title = models.CharField(max_length=200)
date = models.DateTimeField()
class Meta:
ordering = ('date',)
def __unicode__(self):
return self.title
def get_absolute_url(self):
return "/blog/%s/" % self.pk
class Articl... | 474 | Python | .py | 15 | 25.8 | 44 | 0.660754 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,742 | feeds.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/syndication/feeds.py | from django.contrib.syndication import feeds, views
from django.core.exceptions import ObjectDoesNotExist
from django.utils import feedgenerator, tzinfo
from models import Article, Entry
class ComplexFeed(views.Feed):
def get_object(self, request, foo=None):
if foo is not None:
raise ObjectDoe... | 3,833 | Python | .py | 103 | 31.368932 | 77 | 0.694934 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,743 | urls.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/syndication/urls.py | from django.conf.urls.defaults import *
import feeds
feed_dict = {
'complex': feeds.DeprecatedComplexFeed,
'rss': feeds.DeprecatedRssFeed,
}
urlpatterns = patterns('django.contrib.syndication.views',
(r'^complex/(?P<foo>.*)/$', feeds.ComplexFeed()),
(r'^rss2/$', feeds.TestRss2Feed()),
(r'^rss091/... | 811 | Python | .py | 20 | 36.55 | 70 | 0.625159 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,744 | tests.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/syndication/tests.py | import datetime
import warnings
from xml.dom import minidom
from django.contrib.syndication import feeds, views
from django.core.exceptions import ImproperlyConfigured
from django.test import TestCase
from django.utils import tzinfo
from django.utils.feedgenerator import rfc2822_date, rfc3339_date
from models import ... | 14,553 | Python | .py | 311 | 37.289389 | 151 | 0.615618 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,745 | models.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/select_related_regress/models.py | from django.db import models
class Building(models.Model):
name = models.CharField(max_length=10)
def __unicode__(self):
return u"Building: %s" % self.name
class Device(models.Model):
building = models.ForeignKey('Building')
name = models.CharField(max_length=10)
def __unicode__(self):
... | 2,390 | Python | .py | 62 | 34.129032 | 77 | 0.722222 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,746 | tests.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/select_related_regress/tests.py | from django.test import TestCase
from regressiontests.select_related_regress.models import *
class SelectRelatedRegressTests(TestCase):
def test_regression_7110(self):
"""
Regression test for bug #7110.
When using select_related(), we must query the
Device and Building tables usin... | 6,336 | Python | .py | 106 | 50.698113 | 129 | 0.675105 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,747 | urls.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/context_processors/urls.py | from django.conf.urls.defaults import *
import views
urlpatterns = patterns('',
(r'^request_attrs/$', views.request_processor),
(r'^auth_processor_no_attr_access/$', views.auth_processor_no_attr_access),
(r'^auth_processor_attr_access/$', views.auth_processor_attr_access),
(r'^auth_processor_user/$',... | 544 | Python | .py | 11 | 45.636364 | 79 | 0.7 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,748 | tests.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/context_processors/tests.py | """
Tests for Django's bundled context processors.
"""
import warnings
from django.conf import settings
from django.contrib.auth import authenticate
from django.db.models import Q
from django.test import TestCase
from django.template import Template
class RequestContextProcessorTests(TestCase):
"""
Tests for ... | 5,103 | Python | .py | 109 | 38.678899 | 81 | 0.660442 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,749 | views.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/context_processors/views.py | from django.core import context_processors
from django.shortcuts import render_to_response
from django.template.context import RequestContext
def request_processor(request):
return render_to_response('context_processors/request_attrs.html',
RequestContext(request, {}, processors=[context_processors.reques... | 1,698 | Python | .py | 29 | 53.517241 | 79 | 0.762793 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,750 | models.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/admin_ordering/models.py | # coding: utf-8
from django.db import models
from django.contrib import admin
class Band(models.Model):
name = models.CharField(max_length=100)
bio = models.TextField()
rank = models.IntegerField()
class Meta:
ordering = ('name',)
class Song(models.Model):
band = models.ForeignKey(Band)
... | 616 | Python | .py | 20 | 26.5 | 53 | 0.715254 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,751 | tests.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/admin_ordering/tests.py | from django.test import TestCase
from django.contrib.admin.options import ModelAdmin
from models import Band, Song, SongInlineDefaultOrdering, SongInlineNewOrdering
class TestAdminOrdering(TestCase):
"""
Let's make sure that ModelAdmin.queryset uses the ordering we define in
ModelAdmin rather that orderin... | 2,558 | Python | .py | 64 | 32.34375 | 81 | 0.62671 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,752 | models.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/m2m_regress/models.py | from django.db import models
from django.contrib.auth import models as auth
# No related name is needed here, since symmetrical relations are not
# explicitly reversible.
class SelfRefer(models.Model):
name = models.CharField(max_length=10)
references = models.ManyToManyField('self')
related = models.ManyT... | 1,930 | Python | .py | 45 | 39.2 | 80 | 0.755342 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,753 | tests.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/m2m_regress/tests.py | from django.core.exceptions import FieldError
from django.test import TestCase
from models import (SelfRefer, Tag, TagCollection, Entry, SelfReferChild,
SelfReferChildSibling, Worksheet)
class M2MRegressionTests(TestCase):
def test_multiple_m2m(self):
# Multiple m2m references to model must be distin... | 2,819 | Python | .py | 55 | 42.763636 | 97 | 0.663994 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,754 | models.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/admin_inlines/models.py | """
Testing of admin inline formsets.
"""
from django.db import models
from django.contrib import admin
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from django import forms
class Parent(models.Model):
name = models.CharField(max_length=50)
def __... | 4,836 | Python | .py | 134 | 31.873134 | 91 | 0.744562 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,755 | tests.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/admin_inlines/tests.py | from django.contrib.admin.helpers import InlineAdminForm
from django.contrib.contenttypes.models import ContentType
from django.test import TestCase
# local test models
from models import (Holder, Inner, InnerInline, Holder2, Inner2, Holder3,
Inner3, Person, OutfitItem, Fashionista, Teacher, Parent, Child)
class... | 7,030 | Python | .py | 133 | 44.105263 | 138 | 0.663611 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,756 | models.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/m2m_through_regress/models.py | from datetime import datetime
from django.contrib.auth.models import User
from django.core import management
from django.db import models
# Forward declared intermediate model
class Membership(models.Model):
person = models.ForeignKey('Person')
group = models.ForeignKey('Group')
price = models.IntegerFie... | 2,347 | Python | .py | 56 | 37.392857 | 86 | 0.7163 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,757 | tests.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/m2m_through_regress/tests.py | try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from django.core import management
from django.contrib.auth.models import User
from django.test import TestCase
from models import (Person, Group, Membership, UserMembership,
Car, Driver, CarDriver)
cla... | 5,743 | Python | .py | 118 | 39.754237 | 356 | 0.619303 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,758 | models.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/select_related_onetoone/models.py | from django.db import models
class User(models.Model):
username = models.CharField(max_length=100)
email = models.EmailField()
def __unicode__(self):
return self.username
class UserProfile(models.Model):
user = models.OneToOneField(User)
city = models.CharField(max_length=100)
state... | 1,340 | Python | .py | 34 | 34.294118 | 64 | 0.705288 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,759 | tests.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/select_related_onetoone/tests.py | from django import db
from django.conf import settings
from django.test import TestCase
from models import (User, UserProfile, UserStat, UserStatResult, StatDetails,
AdvancedUserStat, Image, Product)
class ReverseSelectRelatedTestCase(TestCase):
def setUp(self):
user = User.objects.create(username="te... | 4,044 | Python | .py | 76 | 42.315789 | 110 | 0.649469 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,760 | included_urls2.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/urlpatterns_reverse/included_urls2.py | """
These URL patterns are included in two different ways in the main urls.py, with
an extra argument present in one case. Thus, there are two different ways for
each name to resolve and Django must distinguish the possibilities based on the
argument list.
"""
from django.conf.urls.defaults import *
from views import ... | 490 | Python | .py | 12 | 39 | 79 | 0.726891 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,761 | urls.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/urlpatterns_reverse/urls.py | from django.conf.urls.defaults import *
from views import empty_view, absolute_kwargs_view
other_patterns = patterns('',
url(r'non_path_include/$', empty_view, name='non_path_include'),
)
urlpatterns = patterns('',
url(r'^places/(\d+)/$', empty_view, name='places'),
url(r'^places?/$', empty_view, name="pl... | 3,133 | Python | .py | 55 | 51.6 | 80 | 0.582192 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,762 | extra_urls.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/urlpatterns_reverse/extra_urls.py | """
Some extra URL patterns that are included at the top level.
"""
from django.conf.urls.defaults import *
from views import empty_view
urlpatterns = patterns('',
url(r'^e-places/(\d+)/$', empty_view, name='extra-places'),
url(r'^e-people/(?P<name>\w+)/$', empty_view, name="extra-people"),
url('', includ... | 481 | Python | .py | 11 | 41.090909 | 100 | 0.698718 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,763 | named_urls.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/urlpatterns_reverse/named_urls.py | from django.conf.urls.defaults import *
from views import empty_view
urlpatterns = patterns('',
url(r'^$', empty_view, name="named-url1"),
url(r'^extra/(?P<extra>\w+)/$', empty_view, name="named-url2"),
url(r'^(?P<one>\d+)|(?P<two>\d+)/$', empty_view),
(r'^included/', include('regressiontests.urlpatter... | 357 | Python | .py | 8 | 41.5 | 88 | 0.655172 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,764 | urlconf_outer.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/urlpatterns_reverse/urlconf_outer.py | from django.conf.urls.defaults import *
import urlconf_inner
urlpatterns = patterns('',
url(r'^test/me/$', urlconf_inner.inner_view, name='outer'),
url(r'^inner_urlconf/', include(urlconf_inner.__name__))
) | 217 | Python | .py | 6 | 33.5 | 63 | 0.708134 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,765 | urls_without_full_import.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/urlpatterns_reverse/urls_without_full_import.py | # A URLs file that doesn't use the default
# from django.conf.urls.defaults import *
# import pattern.
from django.conf.urls.defaults import patterns, url
from views import empty_view, bad_view
urlpatterns = patterns('',
url(r'^test_view/$', empty_view, name="test_view"),
url(r'^bad_view/$', bad_view, name="ba... | 332 | Python | .py | 9 | 34.888889 | 55 | 0.720497 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,766 | included_named_urls2.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/urlpatterns_reverse/included_named_urls2.py | from django.conf.urls.defaults import *
from views import empty_view
urlpatterns = patterns('',
url(r'^$', empty_view, name="named-url5"),
url(r'^extra/(?P<extra>\w+)/$', empty_view, name="named-url6"),
url(r'^(?P<one>\d+)|(?P<two>\d+)/$', empty_view),
)
| 269 | Python | .py | 7 | 35.428571 | 67 | 0.623077 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,767 | included_urls.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/urlpatterns_reverse/included_urls.py | from django.conf.urls.defaults import *
from views import empty_view
urlpatterns = patterns('',
url(r'^$', empty_view, name="inner-nothing"),
url(r'^extra/(?P<extra>\w+)/$', empty_view, name="inner-extra"),
url(r'^(?P<one>\d+)|(?P<two>\d+)/$', empty_view, name="inner-disjunction"),
)
| 298 | Python | .py | 7 | 39.714286 | 79 | 0.641379 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,768 | tests.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/urlpatterns_reverse/tests.py | """
Unit tests for reverse URL lookups.
"""
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.urlresolvers import reverse, resolve, NoReverseMatch,\
Resolver404, ResolverMatch,\
RegexURLReso... | 23,916 | Python | .py | 390 | 53.148718 | 187 | 0.630087 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,769 | included_namespace_urls.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/urlpatterns_reverse/included_namespace_urls.py | from django.conf.urls.defaults import *
from namespace_urls import URLObject
from views import view_class_instance
testobj3 = URLObject('testapp', 'test-ns3')
urlpatterns = patterns('regressiontests.urlpatterns_reverse.views',
url(r'^normal/$', 'empty_view', name='inc-normal-view'),
url(r'^normal/(?P<arg1>\d+... | 901 | Python | .py | 14 | 60.642857 | 108 | 0.673099 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,770 | middleware.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/urlpatterns_reverse/middleware.py | from django.core.urlresolvers import set_urlconf
import urlconf_inner
class ChangeURLconfMiddleware(object):
def process_request(self, request):
request.urlconf = urlconf_inner.__name__
class NullChangeURLconfMiddleware(object):
def process_request(self, request):
request.urlconf = None
| 315 | Python | .py | 8 | 35 | 48 | 0.776316 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,771 | urls_error_handlers.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/urlpatterns_reverse/urls_error_handlers.py | # Used by the ErrorHandlerResolutionTests test case.
from django.conf.urls.defaults import patterns
urlpatterns = patterns('')
handler404 = 'regressiontests.urlpatterns_reverse.views.empty_view'
handler500 = 'regressiontests.urlpatterns_reverse.views.empty_view'
| 266 | Python | .py | 5 | 51.6 | 67 | 0.841085 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,772 | included_named_urls.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/urlpatterns_reverse/included_named_urls.py | from django.conf.urls.defaults import *
from views import empty_view
urlpatterns = patterns('',
url(r'^$', empty_view, name="named-url3"),
url(r'^extra/(?P<extra>\w+)/$', empty_view, name="named-url4"),
url(r'^(?P<one>\d+)|(?P<two>\d+)/$', empty_view),
(r'^included/', include('regressiontests.urlpatter... | 359 | Python | .py | 8 | 41.625 | 89 | 0.65616 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,773 | urlconf_inner.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/urlpatterns_reverse/urlconf_inner.py | from django.conf.urls.defaults import *
from django.template import Template, Context
from django.http import HttpResponse
def inner_view(request):
content = Template('{% load url from future %}'
'{% url "outer" as outer_url %}outer:{{ outer_url }},'
'{% url "inner" as... | 491 | Python | .py | 11 | 38.272727 | 95 | 0.636743 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,774 | urls_error_handlers_callables.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/urlpatterns_reverse/urls_error_handlers_callables.py | # Used by the ErrorHandlerResolutionTests test case.
from django.conf.urls.defaults import patterns
from views import empty_view
urlpatterns = patterns('')
handler404 = empty_view
handler500 = empty_view
| 207 | Python | .py | 6 | 33 | 52 | 0.833333 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,775 | views.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/urlpatterns_reverse/views.py | from django.http import HttpResponse
def empty_view(request, *args, **kwargs):
return HttpResponse('')
def kwargs_view(request, arg1=1, arg2=2):
return HttpResponse('')
def absolute_kwargs_view(request, arg1=1, arg2=2):
return HttpResponse('')
class ViewClass(object):
def __call__(self, request, *ar... | 518 | Python | .py | 13 | 36.230769 | 74 | 0.713427 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,776 | namespace_urls.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/urlpatterns_reverse/namespace_urls.py | from django.conf.urls.defaults import *
from views import view_class_instance
class URLObject(object):
def __init__(self, app_name, namespace):
self.app_name = app_name
self.namespace = namespace
def urls(self):
return patterns('',
url(r'^inner/$', 'empty_view', name='urlob... | 1,900 | Python | .py | 34 | 50.735294 | 117 | 0.646519 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,777 | models.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/extra_regress/models.py | import datetime
import django.utils.copycompat as copy
from django.contrib.auth.models import User
from django.db import models
class RevisionableModel(models.Model):
base = models.ForeignKey('self', null=True)
title = models.CharField(blank=True, max_length=255)
when = models.DateTimeField(default=datet... | 1,241 | Python | .py | 30 | 34.966667 | 76 | 0.676103 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,778 | tests.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/extra_regress/tests.py | from django.test import TestCase
from django.utils.datastructures import SortedDict
from django.contrib.auth.models import User
from regressiontests.extra_regress.models import TestObject, Order, \
RevisionableModel
import datetime
class ExtraRegressTests(TestCase):
def setUp(self):
self.u = Us... | 12,934 | Python | .py | 268 | 37.350746 | 159 | 0.567829 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,779 | tests.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/mail/tests.py | # coding: utf-8
import asyncore
import email
import os
import shutil
import smtpd
import sys
from StringIO import StringIO
import tempfile
import threading
from django.conf import settings
from django.core import mail
from django.core.mail import (EmailMessage, mail_admins, mail_managers,
EmailMultiAlternative... | 29,439 | Python | .py | 538 | 46.141264 | 291 | 0.657086 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,780 | custombackend.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/mail/custombackend.py | """A custom backend for testing."""
from django.core.mail.backends.base import BaseEmailBackend
class EmailBackend(BaseEmailBackend):
def __init__(self, *args, **kwargs):
super(EmailBackend, self).__init__(*args, **kwargs)
self.test_outbox = []
def send_messages(self, email_messages):
... | 464 | Python | .py | 10 | 40.1 | 65 | 0.694878 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,781 | models.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/inspectdb/models.py | from django.db import models
class People(models.Model):
name = models.CharField(max_length=255)
class Message(models.Model):
from_field = models.ForeignKey(People, db_column='from_id')
| 197 | Python | .py | 5 | 36.2 | 63 | 0.767196 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,782 | tests.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/inspectdb/tests.py | from StringIO import StringIO
from django.core.management import call_command
from django.test import TestCase, skipUnlessDBFeature
class InspectDBTestCase(TestCase):
@skipUnlessDBFeature('can_introspect_foreign_keys')
def test_attribute_name_not_python_keyword(self):
out = StringIO()
call_c... | 656 | Python | .py | 12 | 48.666667 | 104 | 0.75 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,783 | test_saferef.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/dispatch/tests/test_saferef.py | from django.dispatch.saferef import *
from django.utils import unittest
class Test1(object):
def x(self):
pass
def test2(obj):
pass
class Test2(object):
def __call__(self, obj):
pass
class Tester(unittest.TestCase):
def setUp(self):
ts = []
ss = []
for x in x... | 2,107 | Python | .py | 65 | 23.015385 | 76 | 0.560743 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,784 | __init__.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/dispatch/tests/__init__.py | """
Unit-tests for the dispatch project
"""
from test_saferef import *
from test_dispatcher import *
| 102 | Python | .py | 5 | 19.2 | 35 | 0.78125 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,785 | test_dispatcher.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/dispatch/tests/test_dispatcher.py | import gc
import sys
from django.dispatch import Signal
from django.utils import unittest
import django.utils.copycompat as copy
if sys.platform.startswith('java'):
def garbage_collect():
"""Run the garbage collector and wait a bit to let it do his work"""
import time
gc.collect()
... | 3,726 | Python | .py | 104 | 28.134615 | 76 | 0.633259 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,786 | tests.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/builtin_server/tests.py | from StringIO import StringIO
from django.core.servers.basehttp import ServerHandler
from django.utils.unittest import TestCase
#
# Tests for #9659: wsgi.file_wrapper in the builtin server.
# We need to mock a couple of of handlers and keep track of what
# gets called when using a couple kinds of WSGI apps.
#
class ... | 1,738 | Python | .py | 42 | 35.761905 | 83 | 0.685053 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,787 | models.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/model_fields/models.py | import os
import tempfile
# Try to import PIL in either of the two ways it can end up installed.
# Checking for the existence of Image is enough for CPython, but for PyPy,
# you need to check for the underlying modules.
try:
from PIL import Image, _imaging
except ImportError:
try:
import Image, _imagi... | 5,575 | Python | .py | 134 | 32.61194 | 79 | 0.608495 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,788 | imagefield.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/model_fields/imagefield.py | import os
import shutil
from django.core.files import File
from django.core.files.base import ContentFile
from django.core.files.images import ImageFile
from django.test import TestCase
from models import Image, Person, PersonWithHeight, PersonWithHeightAndWidth, \
PersonDimensionsFirst, PersonTwoImages, Test... | 16,535 | Python | .py | 346 | 35.531792 | 79 | 0.59485 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,789 | tests.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/model_fields/tests.py | import datetime
from decimal import Decimal
from django import test
from django import forms
from django.core.exceptions import ValidationError
from django.db import models
from django.db.models.fields.files import FieldFile
from django.utils import unittest
from models import Foo, Bar, Whiz, BigD, BigS, Image, BigIn... | 13,789 | Python | .py | 290 | 39.251724 | 108 | 0.651983 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,790 | models.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/fixtures_regress/models.py | from django.db import models, DEFAULT_DB_ALIAS, connection
from django.contrib.auth.models import User
from django.conf import settings
class Animal(models.Model):
name = models.CharField(max_length=150)
latin_name = models.CharField(max_length=150)
count = models.IntegerField()
weight = models.FloatF... | 5,411 | Python | .py | 148 | 30.716216 | 79 | 0.681836 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,791 | tests.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/fixtures_regress/tests.py | # -*- coding: utf-8 -*-
# Unittests for fixtures.
import os
import re
import sys
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from django.core import management
from django.core.management.commands.dumpdata import sort_dependencies
from django.core.management.base impor... | 20,147 | Python | .py | 568 | 25.512324 | 407 | 0.572541 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,792 | models.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/comment_tests/models.py | """
Comments may be attached to any object. See the comment documentation for
more information.
"""
from django.db import models
from django.test import TestCase
class Author(models.Model):
first_name = models.CharField(max_length=30)
last_name = models.CharField(max_length=30)
def __str__(self):
... | 896 | Python | .py | 25 | 31.48 | 91 | 0.715949 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,793 | urls.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/comment_tests/urls.py | from django.conf.urls.defaults import *
from django.contrib.comments.feeds import LatestCommentFeed
feeds = {
'comments': LatestCommentFeed,
}
urlpatterns = patterns('regressiontests.comment_tests.custom_comments.views',
url(r'^post/$', 'custom_submit_comment'),
url(r'^flag/(\d+)/$', 'custom_... | 626 | Python | .py | 15 | 38.6 | 98 | 0.662829 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,794 | urls_admin.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/comment_tests/urls_admin.py | from django.conf.urls.defaults import *
from django.contrib import admin
from django.contrib.comments.admin import CommentsAdmin
from django.contrib.comments.models import Comment
# Make a new AdminSite to avoid picking up the deliberately broken admin
# modules in other tests.
admin_site = admin.AdminSite()
admin_sit... | 679 | Python | .py | 16 | 40.75 | 79 | 0.79697 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,795 | feed_tests.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/comment_tests/tests/feed_tests.py | import warnings
from django.test.utils import get_warnings_state, restore_warnings_state
from regressiontests.comment_tests.tests import CommentTestCase
class CommentFeedTests(CommentTestCase):
urls = 'regressiontests.comment_tests.urls'
feed_url = '/rss/comments/'
def test_feed(self):
response... | 1,314 | Python | .py | 24 | 46.041667 | 101 | 0.698673 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,796 | comment_view_tests.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/comment_tests/tests/comment_view_tests.py | import re
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.comments import signals
from django.contrib.comments.models import Comment
from regressiontests.comment_tests.models import Article, Book
from regressiontests.comment_tests.tests import CommentTestCase
post_redir... | 11,809 | Python | .py | 247 | 39.149798 | 94 | 0.647003 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,797 | templatetag_tests.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/comment_tests/tests/templatetag_tests.py | from django.contrib.comments.forms import CommentForm
from django.contrib.comments.models import Comment
from django.contrib.contenttypes.models import ContentType
from django.template import Template, Context
from regressiontests.comment_tests.models import Article, Author
from regressiontests.comment_tests.tests impo... | 4,556 | Python | .py | 76 | 52.407895 | 120 | 0.669657 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,798 | model_tests.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/comment_tests/tests/model_tests.py | from django.contrib.comments.models import Comment
from regressiontests.comment_tests.models import Author, Article
from regressiontests.comment_tests.tests import CommentTestCase
class CommentModelTests(CommentTestCase):
def testSave(self):
for c in self.createSomeComments():
self.assertNotE... | 1,924 | Python | .py | 41 | 39.097561 | 83 | 0.681067 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |
1,799 | comment_utils_moderators_tests.py | gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/tests/regressiontests/comment_tests/tests/comment_utils_moderators_tests.py | from regressiontests.comment_tests.tests import CommentTestCase, CT, Site
from django.contrib.comments.forms import CommentForm
from django.contrib.comments.models import Comment
from django.contrib.comments.moderation import moderator, CommentModerator, AlreadyModerated
from regressiontests.comment_tests.models import... | 3,170 | Python | .py | 73 | 36.465753 | 92 | 0.714425 | gabrielfalcao/lettuce | 1,274 | 325 | 102 | GPL-3.0 | 9/5/2024, 5:08:58 PM (Europe/Amsterdam) |