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

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

src/d/j/django-concurrency-HEAD/tests/test_admin_edit.py   django-concurrency(Download)
        res = form.submit()
 
        self.assertIn('original', res.context)
        self.assertTrue(res.context['adminform'].form.errors,
                        res.context['adminform'].form.errors)
        self.assertIn(_('Record Modified'),
        target.save()  # create conflict here
        res = form.submit()
        self.assertIn('original', res.context)
        self.assertTrue(res.context['adminform'].form.errors,
                        res.context['adminform'].form.errors)
        self.assertIn(_('Record Modified'),
        form['date_field'] = 'esss2010-09-01'
        response = form.submit()
        self.assertIn('original', response.context)
        self.assertTrue(response.context['adminform'].form.errors,
                        response.context['adminform'].form.errors)

src/d/j/django-concurrency-HEAD/tests/test_admin_list_editable.py   django-concurrency(Download)
        messages = map(str, list(res.context['messages']))
 
        self.assertIn('Record with pk `%s` has been modified and was not updated' % id1,
                      messages)
        self.assertIn('1 %s was changed successfully.' % force_text(self.TARGET._meta.verbose_name),
        messages = list(map(str, list(res.context['messages'])))
 
        self.assertIn('No %s were changed due conflict errors' % force_text(self.TARGET._meta.verbose_name),
                      messages)
        self.assertEqual(len(messages), 1)

src/d/j/django-concurrency-HEAD/tests/test_middleware.py   django-concurrency(Download)
 
                target = res.context['target']
                self.assertIn('target', res.context)
                self.assertIn('saved', res.context)
 

src/d/j/django-concurrency-HEAD/tests/test_admin_actions.py   django-concurrency(Download)
        res = form.submit().follow()
 
        self.assertIn('SimpleConcurrentModel #%s' % id, res)
        self.assertIn('**concurrent_update**', res)
        self.assertNotIn('**action_update**', res)
        sel.checked = True
        res = form.submit().follow()
        self.assertIn('One or more record were updated', res)
 

src/d/j/django-concurrency-HEAD/tests/test_issues.py   django-concurrency(Download)
            model_admin.save_model(request1, obj, None, True)
 
            self.assertIn(obj.pk, model_admin._get_conflicts(request1))
 
            obj = refetch(obj)