text
stringlengths
0
1.05M
meta
dict
from django.test import TestCase from django.core.exceptions import PermissionDenied from nose.tools import raises from geokey.projects.tests.model_factories import UserF, ProjectF from geokey.projects.models import Project from ..models import Field, Category, LookupValue from .model_factories import ( TextFie...
{ "repo_name": "nagyistoce/geokey", "path": "geokey/categories/tests/test_manager.py", "copies": "1", "size": "13291", "license": "apache-2.0", "hash": -1917502180609311000, "line_mean": 28.4700665188, "line_max": 73, "alpha_frac": 0.5394627944, "autogenerated": false, "ratio": 4.437729549248748, ...
from django.test import TestCase from django.core.exceptions import ValidationError from babik_card_primitives.validators import ( CardNumberLuhnTestValidator, CardNumberIssuerWhitelistValidator, CardSecurityCodeValidator ) class CardNumberLuhnTestValidatorTestCase(TestCase): def test_nonsense_card_nu...
{ "repo_name": "aubreystarktoller/django-babik-card-primitives", "path": "tests/test_validators.py", "copies": "1", "size": "3945", "license": "bsd-3-clause", "hash": 9136825418765689000, "line_mean": 39.6701030928, "line_max": 92, "alpha_frac": 0.6996197719, "autogenerated": false, "ratio": 3.890...
from django.test import TestCase from django.core.exceptions import ValidationError from chatterbot.ext.django_chatterbot.views import ChatterBotView class MockResponse(object): def __init__(self, id_string): self.session = {'chat_session_id': id_string} class ViewTestCase(TestCase): def setUp(sel...
{ "repo_name": "maclogan/VirtualPenPal", "path": "tests_django/test_views.py", "copies": "1", "size": "1587", "license": "bsd-3-clause", "hash": -7561303641133212000, "line_mean": 30.74, "line_max": 66, "alpha_frac": 0.6483931947, "autogenerated": false, "ratio": 3.987437185929648, "config_test"...
from django.test import TestCase from django.core.exceptions import ValidationError from django.contrib.gis.geos import LineString from django.conf import settings from geotrek.core.fields import SnappedLineStringField from geotrek.core.factories import PathFactory class FieldsTest(TestCase): def setUp(self): ...
{ "repo_name": "camillemonchicourt/Geotrek", "path": "geotrek/core/tests/test_fields.py", "copies": "1", "size": "2552", "license": "bsd-2-clause", "hash": -7473676746507555000, "line_mean": 43.7719298246, "line_max": 80, "alpha_frac": 0.5673981191, "autogenerated": false, "ratio": 3.5842696629213...
from django.test import TestCase from django.core.exceptions import ValidationError from django.core.urlresolvers import reverse from django.conf import settings from guests.models import Guest from news.models import News import http class NewsModelsTestCase(TestCase): """ Test news model's """ model = Ne...
{ "repo_name": "Samael500/wed", "path": "mywed/news/tests.py", "copies": "1", "size": "5090", "license": "unlicense", "hash": 3560038546494187500, "line_mean": 37.7519379845, "line_max": 87, "alpha_frac": 0.6355271054, "autogenerated": false, "ratio": 3.798632218844985, "config_test": true, "h...
from django.test import TestCase from django.core.exceptions import ValidationError from django.db import DataError from django.utils import timezone from myhpom.tests.factories import UserFactory from myhpom import models from myhpom.models.user_details import GENDER_CHOICES from datetime import date class UserDetai...
{ "repo_name": "ResearchSoftwareInstitute/MyHPOM", "path": "myhpom/tests/test_user_details_model.py", "copies": "1", "size": "4589", "license": "bsd-3-clause", "hash": 3732370752804023000, "line_mean": 43.125, "line_max": 100, "alpha_frac": 0.6888210939, "autogenerated": false, "ratio": 4.06106194...
from django.test import TestCase from django.core.exceptions import ValidationError from django.db import transaction, IntegrityError from myhpom.models import State, StateRequirementLink class StateRequirementLinkTestCase(TestCase): """ * cannot create without required fields: requirement, text, href (all no...
{ "repo_name": "ResearchSoftwareInstitute/MyHPOM", "path": "myhpom/tests/test_state_requirement_link_model.py", "copies": "1", "size": "1313", "license": "bsd-3-clause", "hash": 5868648771789343000, "line_mean": 42.7666666667, "line_max": 95, "alpha_frac": 0.6473724296, "autogenerated": false, "ra...
from django.test import TestCase from django.core.exceptions import ValidationError from django_dynamic_fixture import G from nose.plugins.attrib import attr from oscar.core.compat import get_user_model from oscar.apps.catalogue.reviews import models from oscar.test.factories import create_product User = get_user_mod...
{ "repo_name": "abhidrona/gn-osc-custom", "path": "tests/integration/catalogue/reviews/model_tests.py", "copies": "6", "size": "4599", "license": "bsd-3-clause", "hash": -2911649730546799000, "line_mean": 30.5, "line_max": 66, "alpha_frac": 0.6236138291, "autogenerated": false, "ratio": 3.76350245...
from django.test import TestCase from django.core.exceptions import ValidationError from rest_framework import serializers as rf_serializers from .. import extra_fields class CheckRequiredFieldSerializer(rf_serializers.Serializer): target_field = extra_fields.CheckRequiredField() class TestCheckRequiredField(T...
{ "repo_name": "salexkidd/restframework-definable-serializer", "path": "definable_serializer/tests/test_extra_fields.py", "copies": "1", "size": "5404", "license": "mit", "hash": 1980431847805681000, "line_mean": 31.1666666667, "line_max": 92, "alpha_frac": 0.5817912657, "autogenerated": false, "r...
from django.test import TestCase from django.core.exceptions import ValidationError import pytest from .models import Named, Notable, DateRange class TestNamed(TestCase): def test_str(self): named_obj = Named(name='foo') assert str(named_obj) == 'foo' class TestNotable(TestCase): def test...
{ "repo_name": "Princeton-CDH/winthrop-django", "path": "winthrop/common/tests.py", "copies": "1", "size": "2693", "license": "apache-2.0", "hash": 261411447796503740, "line_mean": 32.2469135802, "line_max": 86, "alpha_frac": 0.6089862607, "autogenerated": false, "ratio": 3.7664335664335664, "co...
from django.test import TestCase from django.core.exceptions import ValidationError from core.interface.static_intr.models import StaticInterface from systems.models import System from mozdns.domain.models import Domain from mozdns.address_record.models import AddressRecord from mozdns.ptr.models import PTR from mozdn...
{ "repo_name": "rtucker-mozilla/mozilla_inventory", "path": "core/interface/static_intr/tests/basic.py", "copies": "1", "size": "7697", "license": "bsd-3-clause", "hash": -7075191126673886000, "line_mean": 31.4767932489, "line_max": 79, "alpha_frac": 0.5290372873, "autogenerated": false, "ratio": ...
from django.test import TestCase from django.core.exceptions import ValidationError from core.registration.static.models import StaticReg from systems.tests.utils import create_fake_host from mozdns.view.models import View from mozdns.tests.utils import create_fake_zone class StaticRegDecommissionTests(TestCase): ...
{ "repo_name": "rtucker-mozilla/inventory", "path": "core/registration/static/tests/decommission.py", "copies": "2", "size": "1503", "license": "bsd-3-clause", "hash": 5797445504484182000, "line_mean": 33.1590909091, "line_max": 71, "alpha_frac": 0.6373918829, "autogenerated": false, "ratio": 3.40...
from django.test import TestCase from django.core.exceptions import ValidationError from cyder.core.ctnr.models import Ctnr from cyder.core.system.models import System from cyder.cydns.domain.models import Domain from cyder.cydhcp.interface.dynamic_intr.models import DynamicInterface from cyder.cydhcp.network.models i...
{ "repo_name": "drkitty/cyder", "path": "cyder/cydhcp/interface/dynamic_intr/tests/basic_tests.py", "copies": "3", "size": "2366", "license": "bsd-3-clause", "hash": -1725277322944783600, "line_mean": 32.8, "line_max": 76, "alpha_frac": 0.6145393068, "autogenerated": false, "ratio": 3.254470426409...
from django.test import TestCase from django.core.exceptions import ValidationError from mozdns.mx.models import MX from mozdns.cname.models import CNAME from mozdns.domain.models import Domain class MXTests(TestCase): def setUp(self): self.o = Domain(name="org") self.o.save() self.o_e =...
{ "repo_name": "mozilla/inventory", "path": "mozdns/mx/tests.py", "copies": "3", "size": "5505", "license": "bsd-3-clause", "hash": 3746826667764250600, "line_mean": 42.0078125, "line_max": 77, "alpha_frac": 0.5500454133, "autogenerated": false, "ratio": 3.2885304659498207, "config_test": true, ...
from django.test import TestCase from django.core.exceptions import ValidationError from mozdns.ptr.models import PTR from mozdns.tests.utils import create_fake_zone from mozdns.tests.view_tests import random_label from mozdns.ip.models import ipv6_to_longs from mozdns.ip.utils import ip_to_domain_name, nibbilize from...
{ "repo_name": "mozilla/inventory", "path": "mozdns/domain/tests/reverse_tests.py", "copies": "2", "size": "21945", "license": "bsd-3-clause", "hash": 3901197974338075600, "line_mean": 35.09375, "line_max": 79, "alpha_frac": 0.536523126, "autogenerated": false, "ratio": 2.8290576253706328, "conf...
from django.test import TestCase from django.core.exceptions import ValidationError from mozdns.srv.models import SRV from mozdns.domain.models import Domain class SRVTests(TestCase): def setUp(self): self.o = Domain(name="org") self.o.save() self.o_e = Domain(name="oregonstate.org") ...
{ "repo_name": "rtucker-mozilla/mozilla_inventory", "path": "mozdns/srv/tests.py", "copies": "1", "size": "3293", "license": "bsd-3-clause", "hash": -1141986208220804200, "line_mean": 34.0319148936, "line_max": 79, "alpha_frac": 0.552687519, "autogenerated": false, "ratio": 3.4337851929092804, "...
from django.test import TestCase from django.core.exceptions import ValidationError from oscar.apps.catalogue.models import (Product, ProductClass, ProductAttribute, AttributeOptionGroup, Attribut...
{ "repo_name": "Giftingnation/GN-Oscar-Custom", "path": "tests/integration/catalogue/product_tests.py", "copies": "7", "size": "3717", "license": "bsd-3-clause", "hash": 696141808525548900, "line_mean": 37.3195876289, "line_max": 102, "alpha_frac": 0.6088243207, "autogenerated": false, "ratio": 4....
from django.test import TestCase from django.core.exceptions import ValidationError from unittest.mock import patch from meetup.models import Meetup class TestMeetupModelValidations(TestCase): def setUp(self): self.patcher = patch('meetup.models.MeetupClient') self.mock_agent = self.patcher.start() s...
{ "repo_name": "nicole-a-tesla/meetup.pizza", "path": "meetup/tests/test_meetup_validation.py", "copies": "1", "size": "2469", "license": "mit", "hash": -5226951055464786000, "line_mean": 42.3157894737, "line_max": 93, "alpha_frac": 0.73309032, "autogenerated": false, "ratio": 3.0220318237454102, ...
from django.test import TestCase from django.core.exceptions import ValidationError, ObjectDoesNotExist from css.models import * from datetime import datetime from css.scheduling import Conflicts class ConflictsTestCase(TestCase): def setUp(self): schedule1 = Schedule.create("Spring 2017", "active") ...
{ "repo_name": "makennajohnstone/CSS", "path": "tests/test_conflicts.py", "copies": "1", "size": "6122", "license": "mit", "hash": -8449235458069187000, "line_mean": 46.828125, "line_max": 138, "alpha_frac": 0.5971904606, "autogenerated": false, "ratio": 3.506300114547537, "config_test": true, ...
from django.test import TestCase from django.core.exceptions import ValidationError, ObjectDoesNotExist from css.models import * from datetime import datetime class SectionTestCase(TestCase): def setUp(self): schedule1 = Schedule.create("Spring 2017", "active") schedule2 = Schedule.create("Winter...
{ "repo_name": "makennajohnstone/CSS", "path": "tests/test_section.py", "copies": "1", "size": "12509", "license": "mit", "hash": 5422335806718164000, "line_mean": 50.2663934426, "line_max": 237, "alpha_frac": 0.606123591, "autogenerated": false, "ratio": 3.406590413943355, "config_test": true, ...
from django.test import TestCase from django.core.files.base import ContentFile from gaeblob_storage.backends import BlobPropertyStorage, BlobPropertyFile class BlobPropertyStorageTest(TestCase): urls = 'gaeblob_storage.urls' def setUp(self): self.storage = BlobPropertyStorage() self.conten...
{ "repo_name": "feliperfranca/FelipeRFranca_site", "path": "gaeblob_storage/tests.py", "copies": "1", "size": "2616", "license": "bsd-3-clause", "hash": -8412781488775741000, "line_mean": 29.0689655172, "line_max": 74, "alpha_frac": 0.6429663609, "autogenerated": false, "ratio": 3.5737704918032787...
from django.test import TestCase from django.core.files import File from django.core.files.base import ContentFile from django.core.files.images import ImageFile from django.core.files.storage import default_storage from django_gcs.storage import GoogleCloudStorage from test_app.models import TestModel class TestSto...
{ "repo_name": "livingbio/django-gcloud-storage", "path": "tests/test_storages.py", "copies": "2", "size": "4213", "license": "mit", "hash": -7237419433231652000, "line_mean": 35.9561403509, "line_max": 98, "alpha_frac": 0.6790885355, "autogenerated": false, "ratio": 3.496265560165975, "config_t...
from django.test import TestCase from django.core.files import File from django.core.files.uploadedfile import SimpleUploadedFile from django.conf import settings import os.path from validatedfile.fields import FileQuota from testing.models import TestModel, TestModelNoValidate, TestContainer, TestElement from testi...
{ "repo_name": "devartis/django-validated-file", "path": "testing/tests.py", "copies": "2", "size": "13561", "license": "bsd-3-clause", "hash": -7060524862672431000, "line_mean": 39.2403560831, "line_max": 129, "alpha_frac": 0.5513605191, "autogenerated": false, "ratio": 4.324298469387755, "conf...
from django.test import TestCase from django.core.files import File import dpkt from handlers.handlers import generate_json, MongoDBHandler from captures.tasks import * from probr import mongodb class CaptureTaskTestCase(TestCase): def setUp(self): self.pcapfile = File(open('captures/tests/resources/prob...
{ "repo_name": "probr/probr-core", "path": "captures/tests/tests.py", "copies": "1", "size": "2968", "license": "mit", "hash": -1344609005752424700, "line_mean": 33.1149425287, "line_max": 99, "alpha_frac": 0.6529649596, "autogenerated": false, "ratio": 3.79539641943734, "config_test": true, "...
from django.test import TestCase from django.core.files.storage import default_storage from PIL import Image from daguerre.tests.base import BaseTestCase from daguerre.utils import ( make_hash, save_image, get_exif_orientation, get_image_dimensions, apply_exif_orientation, exif_aware_size, DEFAULT_FORMAT, ...
{ "repo_name": "littleweaver/django-daguerre", "path": "daguerre/tests/unit/test_utils.py", "copies": "1", "size": "4701", "license": "bsd-3-clause", "hash": 6724505421208110000, "line_mean": 35.1615384615, "line_max": 80, "alpha_frac": 0.6611359285, "autogenerated": false, "ratio": 3.367478510028...
from django.test import TestCase from django.core.files.storage import default_storage try: from PIL import Image except ImportError: import Image from daguerre.tests.base import BaseTestCase from daguerre.utils import (make_hash, save_image, get_exif_orientation, get_image_dimensions, apply_exif_orientati...
{ "repo_name": "Styria-Digital/django-daguerre", "path": "daguerre/tests/unit/test_utils.py", "copies": "1", "size": "4407", "license": "bsd-3-clause", "hash": -8870738096994165000, "line_mean": 34.5403225806, "line_max": 80, "alpha_frac": 0.6614476968, "autogenerated": false, "ratio": 3.403088803...
from django.test import TestCase from django.core.files.uploadedfile import SimpleUploadedFile from django.contrib.auth.models import User from django.conf import settings from filer.models import File, Image import json import os class TestFile(TestCase): def setUp(self): username, password = 'mock_user...
{ "repo_name": "pbs/cmsplugin-image", "path": "cmsplugin_image/tests/tests.py", "copies": "1", "size": "1623", "license": "bsd-3-clause", "hash": -7276718830597703000, "line_mean": 35.0666666667, "line_max": 80, "alpha_frac": 0.6370918053, "autogenerated": false, "ratio": 3.8188235294117647, "co...
from django.test import TestCase from django.core.files.uploadedfile import SimpleUploadedFile from events.models import Event from project.users.models import User class TestEvent(TestCase): def setUp(self): Event.objects.create(title='First title', user=User.objects.create(...
{ "repo_name": "mansonul/events", "path": "events/tests/test_models.py", "copies": "1", "size": "1191", "license": "mit", "hash": 6307959194556930000, "line_mean": 40.0689655172, "line_max": 149, "alpha_frac": 0.6364399664, "autogenerated": false, "ratio": 3.6873065015479876, "config_test": true...
from django.test import TestCase from django.core import exceptions from django.db.utils import IntegrityError import jdatetime import datetime from django_jalali.tests.models import jDateModel, jDateModelAutoNow, jDateTimeModel, jDateTimeModelAutoNow from custom_settings import change_settings settings_manager = c...
{ "repo_name": "pooyamb/djalali-bdp", "path": "django_jalali/tests/__init__.py", "copies": "1", "size": "6713", "license": "mit", "hash": 6259750963099139000, "line_mean": 39.9329268293, "line_max": 147, "alpha_frac": 0.6485922836, "autogenerated": false, "ratio": 3.2414292612264606, "config_tes...
from django.test import TestCase from django.core import mail from impact.minimal_email_handler import MinimalEmailHandler DEFAULT_PARAM_KEYS = ("to", "subject", "body") DEFAULT_PARAM_VALS = (["a@example.com"], "TEST SUBJECT", "...
{ "repo_name": "masschallenge/impact-api", "path": "web/impact/impact/tests/test_minimal_mail_handler.py", "copies": "1", "size": "1507", "license": "mit", "hash": 6124079788220653000, "line_mean": 31.7608695652, "line_max": 72, "alpha_frac": 0.6065029861, "autogenerated": false, "ratio": 3.874035...
from django.test import TestCase from django.core import mail from oscar.core.compat import get_user_model from oscar.apps.customer.utils import Dispatcher from oscar.apps.customer.models import CommunicationEventType from oscar.test.factories import create_order User = get_user_model() class TestDispatcher(TestCa...
{ "repo_name": "jmt4/django-oscar", "path": "tests/integration/customer/test_dispatcher.py", "copies": "48", "size": "1309", "license": "bsd-3-clause", "hash": -8797659122369818000, "line_mean": 30.9268292683, "line_max": 76, "alpha_frac": 0.6080977846, "autogenerated": false, "ratio": 4.407407407...
from django.test import TestCase from django.core import mail from userena.models import UserenaSignup from userena import settings as userena_settings from userena.utils import get_user_model from guardian.shortcuts import get_perms import datetime, re User = get_user_model() class UserenaManagerTests(TestCase):...
{ "repo_name": "LeonardoGentile/django-userena", "path": "userena/tests/managers.py", "copies": "7", "size": "5880", "license": "bsd-3-clause", "hash": -1887689892986758000, "line_mean": 35.0736196319, "line_max": 105, "alpha_frac": 0.6527210884, "autogenerated": false, "ratio": 3.975659229208925,...
from django.test import TestCase from django.core import management from django.core.urlresolvers import reverse from django.contrib.auth.models import User from basic.groups.models import * class GroupTestCase(TestCase): fixtures = ['groups.json', 'users.json'] def setUp(self): self.user1 = User.ob...
{ "repo_name": "emorozov/django-basic-apps", "path": "basic/groups/tests.py", "copies": "10", "size": "4894", "license": "bsd-3-clause", "hash": 3434641618143726000, "line_mean": 37.8412698413, "line_max": 107, "alpha_frac": 0.6512055578, "autogenerated": false, "ratio": 3.721673003802281, "conf...
from django.test import TestCase from django.core import management from wagtail.wagtailsearch import models from wagtail.tests.utils import login from StringIO import StringIO import unittest class TestHitCounter(TestCase): def test_no_hits(self): self.assertEqual(models.Query.get("Hello").hits, 0) ...
{ "repo_name": "h2oloopan/easymerge", "path": "EasyMerge/tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py", "copies": "3", "size": "5868", "license": "mit", "hash": -1774786473015150000, "line_mean": 35.2222222222, "line_max": 95, "alpha_frac": 0.6390593047, "autogenerated": false, "ratio...
from django.test import TestCase from django.core import management from wagtail.wagtailsearch import models from wagtail.tests.utils import unittest, WagtailTestUtils from StringIO import StringIO class TestHitCounter(TestCase): def test_no_hits(self): self.assertEqual(models.Query.get("Hello").hits, 0) ...
{ "repo_name": "helenwarren/pied-wagtail", "path": "wagtail/wagtailsearch/tests/test_queries.py", "copies": "1", "size": "6450", "license": "bsd-3-clause", "hash": 9028303771525795000, "line_mean": 36.0689655172, "line_max": 95, "alpha_frac": 0.6434108527, "autogenerated": false, "ratio": 3.843861...
from django.test import TestCase from django.core import serializers from core.models import Food, Unit, Equivalence class YamlSerializerTest (TestCase): """Test the custom YAML serializer. """ def setUp(self): self.model_fields = [ (Food, {'name': 'butter', 'grams_per_ml': 1.0, 'food_...
{ "repo_name": "wapcaplet/vittles", "path": "core/tests/serialization.py", "copies": "1", "size": "2277", "license": "mit", "hash": -6213324698534120000, "line_mean": 37.593220339, "line_max": 81, "alpha_frac": 0.558629776, "autogenerated": false, "ratio": 3.757425742574257, "config_test": true,...
from django.test import TestCase from django.core import serializers from django.contrib.auth.models import User from core.models import Transformation, StateIOClient, Job XSLT_PAYLOAD = "<?xml version='1.0' encoding='UTF-8'?><xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='2.0'> <xsl:outpu...
{ "repo_name": "WSULib/combine", "path": "tests/test_models/test_stateio.py", "copies": "1", "size": "6594", "license": "mit", "hash": -7468102136324762000, "line_mean": 50.1162790698, "line_max": 397, "alpha_frac": 0.5409463148, "autogenerated": false, "ratio": 4.2459755312298775, "config_test"...
from django.test import TestCase from django.core.management import call_command from django.utils.six import StringIO from core.tests.mommy_utils import make_recipe, make_user from legalaid.models import Case class CaseOrganisationAssignmentTestCase(TestCase): def test_assign_existing_cases_to_organisation(self)...
{ "repo_name": "ministryofjustice/cla_backend", "path": "cla_backend/apps/legalaid/tests/test_commands.py", "copies": "1", "size": "2043", "license": "mit", "hash": 5002108129737540000, "line_mean": 50.075, "line_max": 109, "alpha_frac": 0.7205090553, "autogenerated": false, "ratio": 3.81869158878...
from django.test import TestCase from django.core.management import call_command from wagtail.core.models import Site from wagtailmenus.conf import settings class TestAutoPopulateMainMenus(TestCase): fixtures = ['test.json'] def setUp(self): super().setUp() # Delete any existing main menus an...
{ "repo_name": "rkhleics/wagtailmenus", "path": "wagtailmenus/tests/test_commands.py", "copies": "2", "size": "2079", "license": "mit", "hash": 4929950048391578000, "line_mean": 38.9807692308, "line_max": 74, "alpha_frac": 0.6584896585, "autogenerated": false, "ratio": 3.7868852459016393, "confi...
from django.test import TestCase from django.core.management import load_command_class, call_command from django.core.management.base import BaseCommand from fixturapp.management.commands import fixturapp_load from fixturapp.tests.dummyapp.models import Dummy from fixturapp.tests.dummyapp.datasets import DummyData d...
{ "repo_name": "henriquebastos/django-fixturapp", "path": "src/fixturapp/tests/test_load.py", "copies": "1", "size": "2604", "license": "bsd-3-clause", "hash": 1932118049575742000, "line_mean": 40.3333333333, "line_max": 78, "alpha_frac": 0.6589861751, "autogenerated": false, "ratio": 3.9394856278...
from django.test import TestCase from django.core.urlresolvers import resolve from django.http import HttpRequest from django.template.loader import render_to_string from lists.views import home_page from lists.models import Item, List class HomePageTest(TestCase): def test_root_url_resolves_to_home_page_view(s...
{ "repo_name": "miracode/django_tdd", "path": "lists/tests.py", "copies": "1", "size": "4421", "license": "mit", "hash": 7897270787017376000, "line_mean": 33.5390625, "line_max": 77, "alpha_frac": 0.6349242253, "autogenerated": false, "ratio": 3.740270727580372, "config_test": true, "has_no_ke...
from django.test import TestCase from django.core.urlresolvers import resolve from django.http import HttpRequest from django.template.loader import render_to_string from .views import home_page from .models import Item, List class HomePageTest(TestCase): def test_root_url_resolves_to_home_page(self): f...
{ "repo_name": "Mirdalan/superlists", "path": "lists/tests.py", "copies": "1", "size": "4556", "license": "mit", "hash": 2675766989261770000, "line_mean": 35.448, "line_max": 110, "alpha_frac": 0.6338893766, "autogenerated": false, "ratio": 3.784053156146179, "config_test": true, "has_no_keywo...
from django.test import TestCase from django.core.urlresolvers import resolve from lists.views import home_page,view_list from django.http import HttpRequest from django.template.loader import render_to_string from lists.models import Item,List # Create your tests here. class NewListTest(TestCase): def test_can_s...
{ "repo_name": "HaoPatrick/tdd-pyhton", "path": "lists/tests/test_views.py", "copies": "1", "size": "4149", "license": "mit", "hash": -4871904488075959000, "line_mean": 35.7168141593, "line_max": 73, "alpha_frac": 0.6252108942, "autogenerated": false, "ratio": 3.809917355371901, "config_test": t...
from django.test import TestCase from django.core.urlresolvers import resolve from video.views import addvideo, deletevideo, poster, video, successpage class VideoURLs(TestCase): def test_upload_url_resolves_to_addvideo_view(self): ''' '/upload/' should be routed to the 'addvideo' function ...
{ "repo_name": "hujosh/signbank-video", "path": "tests/test_urls.py", "copies": "1", "size": "1518", "license": "bsd-3-clause", "hash": 2626696890778067000, "line_mean": 32, "line_max": 73, "alpha_frac": 0.5928853755, "autogenerated": false, "ratio": 3.872448979591837, "config_test": true, "ha...
from django.test import TestCase from django.core.urlresolvers import reverse from ccgallery.tests.mockrequest import MockRequest from ccgallery.models import Item, Category from ccgallery.views import index, item, category class ViewTestCases(TestCase): def setUp(self): self.rf = MockRequest() def t...
{ "repo_name": "designcc/django-ccgallery", "path": "ccgallery/tests/test_views.py", "copies": "1", "size": "2930", "license": "bsd-3-clause", "hash": -7098949443579246000, "line_mean": 31.1978021978, "line_max": 72, "alpha_frac": 0.5590443686, "autogenerated": false, "ratio": 3.496420047732697, ...
from django.test import TestCase from django.core.urlresolvers import reverse from datasets.models import Dataset, DatasetRecord from django.contrib.auth.models import User from django.contrib.auth.hashers import make_password from .models import Choropleth from model_mommy import mommy from model_mommy.recipe import ...
{ "repo_name": "damonkelley/texas-choropleth", "path": "src/choropleths/tests.py", "copies": "2", "size": "6757", "license": "bsd-3-clause", "hash": 8057438024949676000, "line_mean": 38.514619883, "line_max": 76, "alpha_frac": 0.6578363179, "autogenerated": false, "ratio": 3.5998934469898773, "c...
from django.test import TestCase from django.core.urlresolvers import reverse from django.conf import settings from basky import settings as basky_settings from django.contrib.auth.models import User from django.contrib.auth import login class BasketInSessionMiddlwareTestCases(TestCase): """ 'basky.middlewar...
{ "repo_name": "jamiecurle/django-basky", "path": "basky/tests/test_middleware.py", "copies": "1", "size": "2485", "license": "bsd-3-clause", "hash": -8600515662506520000, "line_mean": 37.2307692308, "line_max": 73, "alpha_frac": 0.6478873239, "autogenerated": false, "ratio": 3.8828125, "config_...
from django.test import TestCase from django.core.urlresolvers import reverse from django.conf import settings from importlib import import_module import mock class IndexTestCase(TestCase): def setUp(self): settings.SESSION_ENGINE = 'django.contrib.sessions.backends.file' engine = import_module(...
{ "repo_name": "tsuru/tsuru-autoscale-dashboard", "path": "tsuru_autoscale/app/tests.py", "copies": "1", "size": "1770", "license": "bsd-3-clause", "hash": -5147178790787168000, "line_mean": 37.4782608696, "line_max": 85, "alpha_frac": 0.6711864407, "autogenerated": false, "ratio": 3.5049504950495...
from django.test import TestCase from django.core.urlresolvers import reverse from django.conf import settings from mock import patch from model_mommy import mommy from django_twitter_auth.models import TwitterProfile class LoginViewTest(TestCase): """ Tests for setting up Twitter authentication and redirecting u...
{ "repo_name": "dylanbfox/simple-django-twitter-auth", "path": "django_twitter_auth/tests/test_views.py", "copies": "1", "size": "6627", "license": "mit", "hash": 1184345674610684400, "line_mean": 32.135, "line_max": 86, "alpha_frac": 0.7280820884, "autogenerated": false, "ratio": 3.16929698708751...
from django.test import TestCase from django.core.urlresolvers import reverse from django.conf import settings from pqauth import crypto from pqauth.client import PQAuthClient from pqauth.pqauth_django_server.views import hello from pqauth.pqauth_django_server.views import confirm from pqauth.pqauth_django_server.keys...
{ "repo_name": "teddziuba/pqauth", "path": "python/pqauth/pqauth_django_server/tests/protocol.py", "copies": "1", "size": "2951", "license": "mit", "hash": -3989807133383264000, "line_mean": 34.987804878, "line_max": 90, "alpha_frac": 0.7058624195, "autogenerated": false, "ratio": 3.54261704681872...
from django.test import TestCase from django.core.urlresolvers import reverse from django.conf import settings from tsuru_autoscale.wizard import forms from tsuru_autoscale.wizard import client from importlib import import_module import mock import httpretty import os class ScaleFormTest(TestCase): def test_re...
{ "repo_name": "tsuru/tsuru-autoscale-dashboard", "path": "tsuru_autoscale/wizard/tests.py", "copies": "1", "size": "6191", "license": "bsd-3-clause", "hash": -4059000021059923500, "line_mean": 31.5842105263, "line_max": 78, "alpha_frac": 0.6209013084, "autogenerated": false, "ratio": 3.8216049382...
from django.test import TestCase from django.core.urlresolvers import reverse from django.conf import settings from umessages.forms import ComposeForm from umessages.models import Message, MessageRecipient from umessages.utils import get_user_model User = get_user_model() class MessagesViewsTests(TestCase): fix...
{ "repo_name": "euanlau/django-umessages", "path": "umessages/tests/views.py", "copies": "1", "size": "8572", "license": "bsd-3-clause", "hash": 8857062332412380000, "line_mean": 39.4339622642, "line_max": 84, "alpha_frac": 0.5621791881, "autogenerated": false, "ratio": 4.4117344312918165, "conf...
from django.test import TestCase from django.core.urlresolvers import reverse from django.conf.urls import patterns, url from rapidsms.tests.harness import RapidTest from rapidsms.backends.http import views from rapidsms.backends.http.forms import BaseHttpForm, GenericHttpForm class CustomHttpBackend(views.GenericHt...
{ "repo_name": "ehealthafrica-ci/rapidsms", "path": "rapidsms/backends/http/tests.py", "copies": "3", "size": "5706", "license": "bsd-3-clause", "hash": -2107644785145619000, "line_mean": 42.5572519084, "line_max": 77, "alpha_frac": 0.6191728006, "autogenerated": false, "ratio": 4.1347826086956525...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth import get_user_model from wagtail.tests.utils import WagtailTestUtils from wagtail.wagtailusers.models import UserProfile class TestUserIndexView(TestCase, WagtailTestUtils): def setUp(self): self.logi...
{ "repo_name": "100Shapes/wagtail", "path": "wagtail/wagtailusers/tests.py", "copies": "5", "size": "4750", "license": "bsd-3-clause", "hash": -3380069377736349700, "line_mean": 34.447761194, "line_max": 131, "alpha_frac": 0.6296842105, "autogenerated": false, "ratio": 3.9782244556113904, "confi...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import Group from django.contrib.auth.models import User import json class PreparationsTestCase(TestCase): fixtures = ['test_fixtures'] def setUp(self): user = User.objects.create_user(usern...
{ "repo_name": "osu-cass/whats-fresh-api", "path": "whats_fresh/whats_fresh_api/tests/views/test_preparation_details.py", "copies": "2", "size": "1469", "license": "apache-2.0", "hash": -986899291324743700, "line_mean": 29.6041666667, "line_max": 73, "alpha_frac": 0.6255956433, "autogenerated": fals...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import Group from django.contrib.auth.models import User import json class ProductVendorTestCase(TestCase): fixtures = ['test_fixtures'] def setUp(self): user = User.objects.create_user(user...
{ "repo_name": "iCHAIT/whats-fresh-api", "path": "whats_fresh/whats_fresh_api/tests/views/test_product_vendor_details.py", "copies": "2", "size": "2630", "license": "apache-2.0", "hash": 6621331437753048000, "line_mean": 30.3095238095, "line_max": 79, "alpha_frac": 0.5737642586, "autogenerated": fal...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import Group from django.contrib.auth.models import User import json class ProductViewTestCase(TestCase): fixtures = ['test_fixtures'] def setUp(self): user = User.objects.create_user(userna...
{ "repo_name": "osu-cass/whats-fresh-api", "path": "whats_fresh/whats_fresh_api/tests/views/test_product_view.py", "copies": "2", "size": "4005", "license": "apache-2.0", "hash": 6533371862074538000, "line_mean": 28.0217391304, "line_max": 79, "alpha_frac": 0.5835205993, "autogenerated": false, "r...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import Group from django.contrib.auth.models import User import json class StoriesTestCase(TestCase): fixtures = ['test_fixtures'] def setUp(self): user = User.objects.create_user(username='...
{ "repo_name": "osu-cass/whats-fresh-api", "path": "whats_fresh/whats_fresh_api/tests/views/test_stories.py", "copies": "2", "size": "2457", "license": "apache-2.0", "hash": 869129669805254400, "line_mean": 29.7125, "line_max": 77, "alpha_frac": 0.582010582, "autogenerated": false, "ratio": 3.5557...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User as DjangoUser from anaf.core.models import Group, Perspective, ModuleSetting from models import Event from datetime import datetime class EventsModelTest(TestCase): def test_model_event(self):...
{ "repo_name": "tovmeod/anaf", "path": "anaf/events/tests.py", "copies": "1", "size": "7680", "license": "bsd-3-clause", "hash": -5040389275153969000, "line_mean": 40.9672131148, "line_max": 100, "alpha_frac": 0.6084635417, "autogenerated": false, "ratio": 4.25249169435216, "config_test": true, ...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User, Group from whats_fresh.whats_fresh_api.models import Preparation from haystack.query import SearchQuerySet from collections import OrderedDict class ListPreparationTestCase(TestCase): fixture...
{ "repo_name": "osu-cass/whats-fresh-api", "path": "whats_fresh/whats_fresh_api/tests/views/entry/test_list_preparations.py", "copies": "2", "size": "3117", "license": "apache-2.0", "hash": 6783415717490346000, "line_mean": 35.2441860465, "line_max": 77, "alpha_frac": 0.6060314405, "autogenerated": ...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User, Group from perfiles_usuario.models import Capturista from perfiles_usuario.utils import ADMINISTRADOR_GROUP from administracion.models import Escuela from estudios_socioeconomicos.models import Es...
{ "repo_name": "erikiado/jp2_online", "path": "becas/tests.py", "copies": "1", "size": "7976", "license": "mit", "hash": -1257324984456769500, "line_mean": 38.4851485149, "line_max": 90, "alpha_frac": 0.5486459378, "autogenerated": false, "ratio": 3.737582005623243, "config_test": true, "has_n...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User from content_edit.models import CmsContent class SimpleTest(TestCase): def setUp(self): user = User.objects.create_user('temporary', 'temporary@gmail.com', 'temporary') user.is...
{ "repo_name": "avinashdevicode/django-content-edit-master", "path": "content_edit/tests.py", "copies": "1", "size": "1318", "license": "bsd-3-clause", "hash": -1034806894297955000, "line_mean": 37.7647058824, "line_max": 88, "alpha_frac": 0.6433990895, "autogenerated": false, "ratio": 4.018292682...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User from django.conf import settings from django.forms.models import model_to_dict from explorer.tests.factories import SimpleQueryFactory, QueryLogFactory from explorer.models import Query, QueryLog fr...
{ "repo_name": "guilhermemaba/django-sql-explorer", "path": "explorer/tests/test_views.py", "copies": "1", "size": "18095", "license": "mit", "hash": -6473432343692512000, "line_mean": 41.2803738318, "line_max": 130, "alpha_frac": 0.6474164134, "autogenerated": false, "ratio": 3.5627091947233707, ...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User from django.db import models from menuz.models import Menuz, MenuzItem from menuz.tests import ModelSample class TestViews(TestCase): def setUp(self): self.user = User.objects.create...
{ "repo_name": "ekaputra07/django-menuz", "path": "menuz/tests/test_views.py", "copies": "1", "size": "2528", "license": "bsd-3-clause", "hash": -2196106361529961000, "line_mean": 37.8923076923, "line_max": 88, "alpha_frac": 0.5601265823, "autogenerated": false, "ratio": 4.144262295081967, "conf...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User from django.forms.models import model_to_dict from explorer.tests.factories import SimpleQueryFactory, QueryLogFactory from explorer.models import Query, QueryLog from explorer.views import user_can...
{ "repo_name": "abide/django-sql-explorer", "path": "explorer/tests/test_views.py", "copies": "4", "size": "15666", "license": "mit", "hash": -6917284334665733000, "line_mean": 40.8903743316, "line_max": 130, "alpha_frac": 0.6520490234, "autogenerated": false, "ratio": 3.5808, "config_test": tru...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User from django.utils import simplejson from django.conf import settings from piston import oauth from piston.models import Consumer, Token from piston.forms import OAuthAuthenticationForm try: im...
{ "repo_name": "mozilla/inventory", "path": "vendor-local/src/django-piston/tests/test_project/apps/testapp/tests.py", "copies": "3", "size": "21555", "license": "bsd-3-clause", "hash": 6926411500414861000, "line_mean": 35.6581632653, "line_max": 200, "alpha_frac": 0.5753189515, "autogenerated": fal...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User from friends.models import FriendshipRequest, Friendship, UserBlocks from friends.templatetags import friends_tags class BaseTestCase(TestCase): fixtures = ['test_data.json'] def setUp(se...
{ "repo_name": "muhuk/django-simple-friends", "path": "friends/tests.py", "copies": "1", "size": "8543", "license": "bsd-3-clause", "hash": 4701257988404455000, "line_mean": 48.3815028902, "line_max": 79, "alpha_frac": 0.5890202505, "autogenerated": false, "ratio": 4.185693287604115, "config_tes...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User from lingcod.user_profile.models import UserProfile class UserProfileTest(TestCase): def setUp(self): self.user1 = User.objects.create_user("user1", "user1@marinemap.org",password="pwor...
{ "repo_name": "google-code-export/marinemap", "path": "lingcod/user_profile/tests.py", "copies": "3", "size": "1850", "license": "bsd-3-clause", "hash": -8195312321059585000, "line_mean": 45.25, "line_max": 134, "alpha_frac": 0.6767567568, "autogenerated": false, "ratio": 3.503787878787879, "co...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User from tasks import models class ExtTestCase(TestCase): def create_and_log_in_user(self): user = User.objects.create(username='test_user', email='tuser@iki.fi') user.set_password...
{ "repo_name": "jarnoln/mitasny", "path": "tasks/tests/ext_test_case.py", "copies": "1", "size": "1152", "license": "mit", "hash": -5590299958906228000, "line_mean": 49.0869565217, "line_max": 116, "alpha_frac": 0.6883680556, "autogenerated": false, "ratio": 3.7041800643086815, "config_test": fa...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User from tasks.models import Project, Task, Phase from .ext_test_case import ExtTestCase class TaskListTest(TestCase): def test_reverse(self): self.assertEqual(reverse('tasks:tasks'), '/ta...
{ "repo_name": "jarnoln/mitasny", "path": "tasks/tests/test_views_task.py", "copies": "1", "size": "22436", "license": "mit", "hash": 4773615782419906000, "line_mean": 55.5138539043, "line_max": 128, "alpha_frac": 0.6361650918, "autogenerated": false, "ratio": 3.822146507666099, "config_test": t...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User from basic.relationships.models import * class RelationshipTestCase(TestCase): fixtures = ['users.json'] def setUp(self): self.user1 = User.objects.get(username='nathanb') ...
{ "repo_name": "OnlyInAmerica/django-basic-apps", "path": "basic/relationships/tests.py", "copies": "3", "size": "3817", "license": "bsd-3-clause", "hash": 3448289112957180000, "line_mean": 40.0537634409, "line_max": 111, "alpha_frac": 0.674351585, "autogenerated": false, "ratio": 4.10871905274488...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User from blog.models import Blog, Post from .models import Comment from authapp.models import UserProfile class CommentViewTestCase(TestCase): def setUp(self): super_user = User.objects.c...
{ "repo_name": "v1k45/blogghar", "path": "comments/tests.py", "copies": "1", "size": "1325", "license": "mit", "hash": -5797956797709878000, "line_mean": 32.9743589744, "line_max": 79, "alpha_frac": 0.6301886792, "autogenerated": false, "ratio": 4.260450160771704, "config_test": false, "has_no...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User from getraenke.views import people from getraenke.models import Person class PeopleViewTests(TestCase): def test_correct_template_gets_used(self): response = self.client.get(reverse("...
{ "repo_name": "Faerbit/getraenkewart.de", "path": "getraenke/tests/test_views.py", "copies": "1", "size": "1363", "license": "mit", "hash": -8872216297065980000, "line_mean": 35.8378378378, "line_max": 67, "alpha_frac": 0.6610418195, "autogenerated": false, "ratio": 4.008823529411765, "config_t...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User from lists.forms import TodoForm, TodoListForm from lists.models import Todo, TodoList from unittest import skip class ListTests(TestCase): def setUp(self): self.user = User.objects...
{ "repo_name": "imxiaohui/django-todolist-1", "path": "lists/tests.py", "copies": "1", "size": "6877", "license": "mit", "hash": -1159473070336777000, "line_mean": 30.2590909091, "line_max": 74, "alpha_frac": 0.5801948524, "autogenerated": false, "ratio": 3.905167518455423, "config_test": true, ...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User from model_mommy import mommy from .models import Challenge class DetailTest(TestCase): def setUp(self): mommy.make('challenges.challenge', title = 'Moon', slug = 'moon',) def t...
{ "repo_name": "nasa/39A", "path": "spaceapps/challenges/tests.py", "copies": "1", "size": "1449", "license": "apache-2.0", "hash": -46345368741391260, "line_mean": 29.829787234, "line_max": 74, "alpha_frac": 0.6176673568, "autogenerated": false, "ratio": 4.1164772727272725, "config_test": true,...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User from pastebin import settings from pastebin.testcase import CacheAwareTestCase from pastes.models import Paste from users.models import Favorite from freezegun import freeze_time from django.uti...
{ "repo_name": "Matoking/pastebin-django", "path": "users/tests.py", "copies": "1", "size": "27306", "license": "unlicense", "hash": 3022474139368728000, "line_mean": 45.3616298812, "line_max": 145, "alpha_frac": 0.4623159745, "autogenerated": false, "ratio": 5.370967741935484, "config_test": tr...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User from wagtail.tests.utils import WagtailTestUtils from wagtail.wagtailusers.models import UserProfile class TestUserIndexView(TestCase, WagtailTestUtils): def setUp(self): self.login()...
{ "repo_name": "lojack/wagtail", "path": "wagtail/wagtailusers/tests.py", "copies": "1", "size": "4699", "license": "bsd-3-clause", "hash": 9041922332437616000, "line_mean": 34.0671641791, "line_max": 119, "alpha_frac": 0.6292828261, "autogenerated": false, "ratio": 3.995748299319728, "config_te...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User # Required to assign User as a borrower from django.contrib.auth.models import Permission # Required to grant the permission needed to set a book as returned. import datetime from django.utils impo...
{ "repo_name": "PatrickCmd/django_local_library", "path": "catalog/tests/test_views.py", "copies": "1", "size": "12327", "license": "apache-2.0", "hash": 4303236035353660000, "line_mean": 46.0496183206, "line_max": 163, "alpha_frac": 0.6667477894, "autogenerated": false, "ratio": 3.651362559241706...
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib import auth from django.contrib.auth.models import User from core import test_utils class RegistrationTest(TestCase): def test_fail(self): # No data. self.client.post(reverse("user_registration")) ...
{ "repo_name": "daGrevis/daGrevis.lv", "path": "dagrevis_lv/user/tests.py", "copies": "1", "size": "2904", "license": "mit", "hash": 3007963304018837500, "line_mean": 32.7674418605, "line_max": 63, "alpha_frac": 0.5671487603, "autogenerated": false, "ratio": 4.027739251040222, "config_test": tru...
from django.test import TestCase from django.core.urlresolvers import reverse from django.core.exceptions import ValidationError from urlshortener_project.users.models import User from ..models import ShortenedLink class ShortenerModelsTestCase(TestCase): def setUp(self): self.user = User.objects.create_u...
{ "repo_name": "rdboyett/urlshortener", "path": "urlshortener_project/urlshortener/tests/test_models.py", "copies": "1", "size": "2478", "license": "bsd-3-clause", "hash": 720998331243307300, "line_mean": 42.4736842105, "line_max": 126, "alpha_frac": 0.6747376917, "autogenerated": false, "ratio": ...
from django.test import TestCase from django.core.urlresolvers import reverse from django.core.files.uploadedfile import SimpleUploadedFile from main.models import Image class ViewTestCase(TestCase): def setUp(self): self.image = Image(image=SimpleUploadedFile(name='x.jpg', content='x', content_type='ima...
{ "repo_name": "9dev/django-embed9", "path": "demo/main/tests.py", "copies": "1", "size": "1269", "license": "mit", "hash": -5064854484694836000, "line_mean": 36.3235294118, "line_max": 123, "alpha_frac": 0.6524822695, "autogenerated": false, "ratio": 4.080385852090032, "config_test": true, "h...
from django.test import TestCase from django.core.urlresolvers import reverse from django.core import mail from django.contrib.auth.models import User, Permission from concerns.models import Concern class BaseTestCase(TestCase): def setUp(self): self.user = User.objects.create_user(username='user', passwo...
{ "repo_name": "chop-dbhi/django-concerns", "path": "tests/tests.py", "copies": "1", "size": "3258", "license": "bsd-2-clause", "hash": -3248300518717052000, "line_mean": 34.0322580645, "line_max": 84, "alpha_frac": 0.6553100061, "autogenerated": false, "ratio": 3.897129186602871, "config_test":...
from django.test import TestCase from django.core.urlresolvers import reverse from django.core import mail from wagtail.tests.utils import WagtailTestUtils from wagtail.wagtailcore.models import Page from wagtail.wagtailadmin.tasks import send_email_task class TestHome(TestCase, WagtailTestUtils): def setUp(self...
{ "repo_name": "willcodefortea/wagtail", "path": "wagtail/wagtailadmin/tests/tests.py", "copies": "4", "size": "3260", "license": "bsd-3-clause", "hash": -2263863566073354800, "line_mean": 44.2777777778, "line_max": 148, "alpha_frac": 0.6911042945, "autogenerated": false, "ratio": 3.75143843498273...
from django.test import TestCase from django.core.urlresolvers import reverse from django.core import paginator from wagtail.wagtailcore.models import Page from wagtail.wagtailsearch.models import Query from wagtail.tests.testapp.models import EventPage class TestSearchView(TestCase): fixtures = ['test.json'] ...
{ "repo_name": "gogobook/wagtail", "path": "wagtail/wagtailsearch/tests/test_frontend.py", "copies": "2", "size": "5428", "license": "bsd-3-clause", "hash": 2311186882888893400, "line_mean": 40.1212121212, "line_max": 96, "alpha_frac": 0.6654384672, "autogenerated": false, "ratio": 4.1183611532625...
from django.test import TestCase from django.core.urlresolvers import reverse from django.core.urlresolvers import resolve class OrgUrlsTest(TestCase): def test_collection_new_viewname_to_url(self): url = reverse('collection-new', kwargs={'org':'myorgs'}) self.assertEqual(url, '/orgs/myorgs/collect...
{ "repo_name": "burakince/ocl_web", "path": "ocl_web/config/tests_orgs_urls.py", "copies": "7", "size": "12907", "license": "mpl-2.0", "hash": -7189173833055590000, "line_mean": 53.9234042553, "line_max": 140, "alpha_frac": 0.6955915395, "autogenerated": false, "ratio": 3.8062518431141257, "conf...
from django.test import TestCase from django.core.urlresolvers import reverse from django.db import models from wagtail.tests.utils import WagtailTestUtils from django.test.utils import override_settings from wagtail.tests.models import Advert, AlphaSnippet, ZuluSnippet from wagtail.wagtailsnippets.models import regis...
{ "repo_name": "benemery/wagtail", "path": "wagtail/wagtailsnippets/tests.py", "copies": "3", "size": "8626", "license": "bsd-3-clause", "hash": -2612124943623731000, "line_mean": 37.1681415929, "line_max": 131, "alpha_frac": 0.6379550197, "autogenerated": false, "ratio": 3.9879796578825704, "co...
from django.test import TestCase from django.core.urlresolvers import reverse from django.http import HttpRequest, QueryDict from django.contrib.auth.models import AnonymousUser from django.template.loader import render_to_string from django.contrib.sites.shortcuts import get_current_site from rest_framework.test impo...
{ "repo_name": "ExCiteS/geokey-epicollect", "path": "geokey_epicollect/tests/test_views.py", "copies": "1", "size": "17983", "license": "mit", "hash": -4619933448430170000, "line_mean": 37.8401727862, "line_max": 79, "alpha_frac": 0.6130790191, "autogenerated": false, "ratio": 4.086116791638264, ...
from django.test import TestCase from django.core.urlresolvers import reverse from django.template import Template, Context from django.utils.text import slugify from mockups import Mockup, Factory from . import models import warnings # class PartnerFactory(Factory): class ProjectsTestMixin(object): project_...
{ "repo_name": "airtonix/django-project-portfolio", "path": "projects/tests.py", "copies": "1", "size": "2266", "license": "bsd-3-clause", "hash": -4049423859953593000, "line_mean": 30.9295774648, "line_max": 78, "alpha_frac": 0.640776699, "autogenerated": false, "ratio": 4.25140712945591, "conf...
from django.test import TestCase from django.core.urlresolvers import reverse from django.test.client import Client from models import UserProfile from django.utils import timezone from django.contrib.auth.models import User import json import logging class userProfileTests(TestCase): def test_set_lucky_day(self): ...
{ "repo_name": "youtaya/mothertree", "path": "monthertree/muser/tests.py", "copies": "1", "size": "1288", "license": "mit", "hash": -6793812480094238000, "line_mean": 22.8518518519, "line_max": 67, "alpha_frac": 0.6723602484, "autogenerated": false, "ratio": 2.8878923766816142, "config_test": tr...
from django.test import TestCase from django.core.urlresolvers import reverse from django.test.client import Client from wagtail.search.backends import get_search_backend from molo.core.models import SiteLanguageRelation, \ Main, Languages, FooterPage from molo.core.tests.base import MoloTestCaseMixin class Tes...
{ "repo_name": "praekelt/molo", "path": "molo/core/tests/test_search.py", "copies": "1", "size": "6333", "license": "bsd-2-clause", "hash": -7676833358240219000, "line_mean": 33.4184782609, "line_max": 68, "alpha_frac": 0.5978209379, "autogenerated": false, "ratio": 4.091085271317829, "config_te...
from django.test import TestCase from django.core.urlresolvers import reverse from django.test.utils import override_settings from django.contrib.auth import get_user_model from django.contrib.auth.models import Permission from django.core.exceptions import ImproperlyConfigured from taggit.models import Tag from wagt...
{ "repo_name": "JoshBarr/wagtail", "path": "wagtail/wagtailsnippets/tests.py", "copies": "2", "size": "26001", "license": "bsd-3-clause", "hash": -6332811596569141000, "line_mean": 39.9464566929, "line_max": 119, "alpha_frac": 0.6305526711, "autogenerated": false, "ratio": 4.02928870292887, "con...
from django.test import TestCase from django.core.urlresolvers import reverse from django.test.utils import override_settings from django.contrib.auth.models import Group from django.contrib.auth.models import User import json class VendorsProductsTestCase(TestCase): fixtures = ['overlapping_fixtures'] def ...
{ "repo_name": "osu-cass/whats-fresh-api", "path": "whats_fresh/whats_fresh_api/tests/views/test_vendors_products.py", "copies": "2", "size": "30834", "license": "apache-2.0", "hash": 3367027071909652500, "line_mean": 26.4568121104, "line_max": 79, "alpha_frac": 0.540539664, "autogenerated": false, ...
from django.test import TestCase from django.core.urlresolvers import reverse from django.utils.crypto import get_random_string from core.tests.mommy_utils import make_recipe, make_user from call_centre.models import Operator, Caseworker class OperatorAdminViewTestCase(TestCase): def setUp(self): super(O...
{ "repo_name": "ministryofjustice/cla_backend", "path": "cla_backend/apps/call_centre/tests/admin/test_views.py", "copies": "1", "size": "27280", "license": "mit", "hash": -4903660081493453000, "line_mean": 40.2708018154, "line_max": 119, "alpha_frac": 0.6299853372, "autogenerated": false, "ratio"...
from django.test import TestCase from django.core.urlresolvers import reverse from django.utils import timezone from django.core.urlresolvers import reverse from mainapp.forms import CreateReviewForm from mainapp.models import Researcher, Review, Paper, Query from django.contrib.auth.models import User # tests for ...
{ "repo_name": "Alistair401/10C", "path": "SysReview/mainapp/tests.py", "copies": "1", "size": "4676", "license": "mit", "hash": -2050311381481921300, "line_mean": 21.8097560976, "line_max": 124, "alpha_frac": 0.6721556886, "autogenerated": false, "ratio": 4.274223034734918, "config_test": true,...
from django.test import TestCase from django.core.urlresolvers import reverse from django.utils.text import truncate_words from userena.contrib.umessages.models import Message, MessageRecipient, MessageContact from userena.utils import get_user_model User = get_user_model() class MessageContactTests(TestCase): f...
{ "repo_name": "clione/django-kanban", "path": "src/core/userena/contrib/umessages/tests/models.py", "copies": "5", "size": "2120", "license": "mit", "hash": 6665563288196298000, "line_mean": 33.7540983607, "line_max": 86, "alpha_frac": 0.6306603774, "autogenerated": false, "ratio": 4.300202839756...
from django.test import TestCase from django.core.urlresolvers import reverse from django.utils.timezone import now from django.test.utils import override_settings from rapidsms.backends.kannel import KannelBackend from rapidsms.backends.kannel.forms import KannelForm from rapidsms.backends.kannel.models import Delive...
{ "repo_name": "catalpainternational/rapidsms", "path": "rapidsms/backends/kannel/tests.py", "copies": "1", "size": "7282", "license": "bsd-3-clause", "hash": -5343605490632728000, "line_mean": 43.1333333333, "line_max": 79, "alpha_frac": 0.579923098, "autogenerated": false, "ratio": 4.12344280860...
from django.test import TestCase from django.core.urlresolvers import reverse from hippo.models import Feature, Feature_Type, Feature_Database import json, random from giraffe.features import blast class BlastTest(TestCase): def setUp(self): ft_gene = Feature_Type(type='Gene') ft_gene.save() self.dna...
{ "repo_name": "UndeadBlow/giraffe", "path": "src/giraffe/tests.py", "copies": "2", "size": "10673", "license": "mit", "hash": -2156599013070376000, "line_mean": 30.2991202346, "line_max": 92, "alpha_frac": 0.5982385459, "autogenerated": false, "ratio": 3.014120304998588, "config_test": true, ...
from django.test import TestCase from django.core.urlresolvers import reverse from lrs import views, models from oauth_provider.oauth.oauth import OAuthRequest, OAuthSignatureMethod_HMAC_SHA1 from django.test.utils import setup_test_environment from django.contrib.auth.models import User from lrs.objects.StatementManag...
{ "repo_name": "Lindy21/CSE498-LRS", "path": "lrs/tests/OAuthTests.py", "copies": "1", "size": "71726", "license": "apache-2.0", "hash": -3753901903116986400, "line_mean": 53.6275704494, "line_max": 184, "alpha_frac": 0.6367844296, "autogenerated": false, "ratio": 3.7689033681887447, "config_tes...
from django.test import TestCase from django.core.urlresolvers import reverse from lrs import views import datetime from django.utils.timezone import utc import hashlib import urllib import base64 import json import ast class AgentProfileTests(TestCase): testagent = '{"mbox":"mailto:test@example.com"}' otherag...
{ "repo_name": "varunasingh/ustadmobile-tincanlrs", "path": "lrs/tests/AgentProfileTests.py", "copies": "2", "size": "25935", "license": "apache-2.0", "hash": -5195424085011102000, "line_mean": 59.0347222222, "line_max": 178, "alpha_frac": 0.6553691922, "autogenerated": false, "ratio": 3.390639299...
from django.test import TestCase from django.core.urlresolvers import reverse from .models import Expense from django.utils import timezone from datetime import timedelta,date from decimal import Decimal class ExpenseViewTests(TestCase): def test_index_view_no_expenses(self): response = self.client.get(re...
{ "repo_name": "maths22/daily-expenses", "path": "expenses/tests.py", "copies": "1", "size": "2419", "license": "bsd-2-clause", "hash": -8976959029407884000, "line_mean": 62.6578947368, "line_max": 175, "alpha_frac": 0.6721785862, "autogenerated": false, "ratio": 3.5469208211143695, "config_test...