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

All Samples(3)  |  Call(0)  |  Derive(0)  |  Import(3)

src/d/j/django-concurrency-HEAD/tests/test_admin_list_editable.py   django-concurrency(Download)
from concurrency.exceptions import RecordModifiedError
 
from tests.base import AdminTestCase, SENTINEL
from tests.models import ListEditableConcurrentModel
from tests.util import attributes, unique_id
    def _create_conflict(self, pk):
        u = self.TARGET.objects.get(pk=pk)
        u.username = SENTINEL
        u.save()
 

src/d/j/django-concurrency-HEAD/tests/test_admin_edit.py   django-concurrency(Download)
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from concurrency.forms import VersionFieldSigner
from tests.base import AdminTestCase, SENTINEL
from tests.models import SimpleConcurrentModel
    def _create_conflict(self, pk):
        u = SimpleConcurrentModel.objects.get(pk=pk)
        u.username = SENTINEL
        u.save()
 

src/d/j/django-concurrency-HEAD/tests/test_admin_actions.py   django-concurrency(Download)
# -*- coding: utf-8 -*-
from tests.base import AdminTestCase, SENTINEL, skipIfDjangoVersion
from tests.models import SimpleConcurrentModel
from tests.util import unique_id
 
 
class TestAdminActions(AdminTestCase):
    def _create_conflict(self, pk):
        u = SimpleConcurrentModel.objects.get(pk=pk)
        u.username = SENTINEL