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

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

src/p/o/portfoliyo-HEAD/portfoliyo/tests/view/users/test_forms.py   portfoliyo(Download)
 
        school = factories.SchoolFactory.create(
            name="My School",
            postcode="12345",
            )

src/p/o/portfoliyo-HEAD/portfoliyo/tests/view/village/test_forms.py   portfoliyo(Download)
        other_rel = factories.RelationshipFactory.create(
            from_profile__school_staff=True,
            from_profile__school=factories.SchoolFactory.create(),
            to_profile=rel.student,
            )
    def test_edit_group_with_cross_school_elder(self, db):
        """Can preserve cross-school elder group membership."""
        group = factories.GroupFactory.create()
        elder = factories.ProfileFactory.create(
            school_staff=True, school=factories.SchoolFactory.create())

src/p/o/portfoliyo-HEAD/portfoliyo/tests/view/users/test_views.py   portfoliyo(Download)
    def test_register(self, client):
        """Get logged in and redirected to home after registering."""
        school = factories.SchoolFactory.create()
        form = client.get(self.url).forms['register-form']
        form['name'] = 'Some Body'
    def test_register_failed(self, client):
        """Form redisplayed with any errors."""
        school = factories.SchoolFactory.create()
        form = client.get(self.url).forms['register-form']
        form['email'] = 'some@example.com'
    def url(self, client):
        """Shortcut for confirm_email url."""
        school = factories.SchoolFactory.create()
        form = client.get(reverse('register')).forms['register-form']
        form['name'] = 'New Body'

src/p/o/portfoliyo-HEAD/portfoliyo/tests/test_factories.py   portfoliyo(Download)
    def test_specify_school(self, db):
        """Can specify school as if attribute of Relationship."""
        school = factories.SchoolFactory.create()
        rel = factories.RelationshipFactory.create(school=school)