Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(30)  |  Call(26)  |  Derive(0)  |  Import(4)

src/d/j/django-daguerre-2.1.1/daguerre/urls.py   django-daguerre(Download)
from django.conf.urls import patterns, url
 
from daguerre.views import (AdjustedImageRedirectView, AjaxAdjustmentInfoView,
                            AjaxUpdateAreaView)
 

src/d/j/django-daguerre-HEAD/daguerre/urls.py   django-daguerre(Download)
from django.conf.urls import patterns, url
 
from daguerre.views import (AdjustedImageRedirectView, AjaxAdjustmentInfoView,
                            AjaxUpdateAreaView)
 

src/d/j/django-daguerre-HEAD/daguerre/tests/unit/test_views.py   django-daguerre(Download)
from daguerre.models import Area
from daguerre.tests.base import BaseTestCase
from daguerre.views import (AdjustedImageRedirectView, AjaxAdjustmentInfoView,
                            AjaxUpdateAreaView)
 
    def test_not_ajax(self):
        request = self.factory.get('/')
        view = AjaxUpdateAreaView()
        self.assertRaises(Http404, view.get, request)
        self.assertRaises(Http404, view.post, request)
        self.assertRaises(Http404, view.delete, request)
 
    def test_get__pk(self):
        area = self.create_area(x2=50, y2=50)
        view = AjaxUpdateAreaView()
    def test_get__pk__wrong(self):
        area = self.create_area(x2=50, y2=50)
        view = AjaxUpdateAreaView()
        view.kwargs = {
            'storage_path': area.storage_path,
    def test_get__no_pk(self):
        area1 = self.create_area(x2=50, y2=50)
        area2 = self.create_area(x2=50, y2=50, storage_path=area1.storage_path)
        view = AjaxUpdateAreaView()
        view.kwargs = {

src/d/j/django-daguerre-2.1.1/daguerre/tests/unit/test_views.py   django-daguerre(Download)
from daguerre.models import Area
from daguerre.tests.base import BaseTestCase
from daguerre.views import (AdjustedImageRedirectView, AjaxAdjustmentInfoView,
                            AjaxUpdateAreaView)
 
    def test_not_ajax(self):
        request = self.factory.get('/')
        view = AjaxUpdateAreaView()
        self.assertRaises(Http404, view.get, request)
        self.assertRaises(Http404, view.post, request)
        self.assertRaises(Http404, view.delete, request)
 
    def test_get__pk(self):
        area = self.create_area(x2=50, y2=50)
        view = AjaxUpdateAreaView()
    def test_get__pk__wrong(self):
        area = self.create_area(x2=50, y2=50)
        view = AjaxUpdateAreaView()
        view.kwargs = {
            'storage_path': area.storage_path,
    def test_get__no_pk(self):
        area1 = self.create_area(x2=50, y2=50)
        area2 = self.create_area(x2=50, y2=50, storage_path=area1.storage_path)
        view = AjaxUpdateAreaView()
        view.kwargs = {