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

All Samples(12)  |  Call(6)  |  Derive(0)  |  Import(6)

src/d/j/django-dockit-HEAD/dockit/tests/schema/fields_tests.py   django-dockit(Download)
from decimal import Decimal
 
from common import SimpleSchema, SimpleDocument
 
class BaseFieldTestCase(unittest.TestCase):

src/d/j/django-dockit-HEAD/dockit/tests/admin/views.py   django-dockit(Download)
from dockit.admin.views import DocumentProxyView, DeleteView, IndexView, HistoryView, ListFieldIndexView
 
from common import SimpleDocument, SimpleSchema
 
from urllib import urlencode
 
class TestableDeleteView(DeleteView):
    def get_object(self):
        obj = SimpleDocument()
    def test_delete_view(self):
        kwargs = self.admin_model.get_view_kwargs()
        kwargs['object'] = SimpleDocument()
        view = TestableDeleteView.as_view(**kwargs)
 

src/d/j/django-dockit-HEAD/dockit/tests/admin/documentadmin.py   django-dockit(Download)
from dockit.admin.documentadmin import DocumentAdmin, SchemaAdmin
 
from common import SimpleDocument, SimpleSchema
 
class MockView:
        formset = inline_admin.get_formset(request, view=view)
        html = list()
        for form in formset(instance=SimpleDocument()):
            assert form._meta.formfield_callback
            html.append(form.as_table())

src/d/j/django-dockit-0.0.13/dockit/tests/schema/fields_tests.py   django-dockit(Download)
from decimal import Decimal
 
from common import SimpleSchema, SimpleDocument
 
class BaseFieldTestCase(unittest.TestCase):

src/d/j/django-dockit-0.0.13/dockit/tests/admin/views.py   django-dockit(Download)
from dockit.admin.views import DocumentProxyView, DeleteView, IndexView, HistoryView, ListFieldIndexView
 
from common import SimpleDocument, SimpleSchema
 
from urllib import urlencode
 
class TestableDeleteView(DeleteView):
    def get_object(self):
        obj = SimpleDocument()
    def test_delete_view(self):
        kwargs = self.admin_model.get_view_kwargs()
        kwargs['object'] = SimpleDocument()
        view = TestableDeleteView.as_view(**kwargs)
 

src/d/j/django-dockit-0.0.13/dockit/tests/admin/documentadmin.py   django-dockit(Download)
from dockit.admin.documentadmin import DocumentAdmin, SchemaAdmin
 
from common import SimpleDocument, SimpleSchema
 
class MockView:
        formset = inline_admin.get_formset(request, view=view)
        html = list()
        for form in formset(instance=SimpleDocument()):
            assert form._meta.formfield_callback
            html.append(form.as_table())