Did I find the right examples for you? yes no

All Samples(22)  |  Call(20)  |  Derive(0)  |  Import(2)

src/d/j/django-user-tags-1.1/user_tags/tests/forms_tests.py   django-user-tags(Download)
from django_libs.tests.factories import UserFactory
 
from user_tags.tests.test_app.forms import DummyModelForm
from user_tags.models import TaggedItem, UserTag, UserTagGroup
 
 
        """
        form = DummyModelForm(self.user)
        self.assertTrue('tags' in form.fields)
        self.assertEqual(form.fields['tags'].help_text.encode(), 'Help text')
        self.assertTrue('global_tags' in form.fields)
 
    def test_form_valid(self):
        """Form should be valid when valid data is given."""
        form = DummyModelForm(self.user, data=self.data)
 
        """
        form = DummyModelForm(self.user, data=self.data)
        instance = form.save()
        self.assertTrue(instance.pk)
 
        """
        form = DummyModelForm(self.user, data=self.data)
        instance = form.save()
 

src/d/j/django-user-tags-1.1/user_tags/tests/test_app/views.py   django-user-tags(Download)
"""Test view for the `django-user-tags` app."""
from django.core.urlresolvers import reverse
from django.views.generic import FormView
 
from user_tags.tests.test_app.forms import DummyModelForm