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

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

src/p/o/portfoliyo-HEAD/portfoliyo/tests/model/users/test_models.py   portfoliyo(Download)
    def test_unicode_name(self):
        """If no email, unicode representation is name."""
        profile = factories.ProfileFactory.build(
            user__email=None, name="John Doe")
 
    def test_unicode_phone(self):
        """If no email or name, unicode representation is phone."""
        profile = factories.ProfileFactory.build(
            user__email=None, name="", phone="+13216540987")
 
    def test_unicode_fallback(self):
        """If no email/name/phone, unicode representation is <unknown>."""
        profile = factories.ProfileFactory.build(
            user__email=None, name="", phone=None)
 
    def test_unicode(self):
        """Unicode representation of a Profile is its name."""
        profile = factories.ProfileFactory.build(name="Some Name")
 
        assert unicode(profile) == u"Some Name"
 
 
    def test_unicode_email(self):
        """If no name, unicode of a Profile is email."""
        profile = factories.ProfileFactory.build(user__email="foo@example.com")

src/p/o/portfoliyo-HEAD/portfoliyo/tests/view/templatetags/test_elders.py   portfoliyo(Download)
    def test_declined(self):
        p = factories.ProfileFactory.build(declined=True)
        assert elders.elder_status(p, None) == 'declined'
 
 
    def test_inactive(self):
        p = factories.ProfileFactory.build(user__is_active=False)
    def test_mobile(self):
        p = factories.ProfileFactory.build(phone='+13216540987')
        assert elders.elder_status(p, None) == 'mobile'
 
 
    def test_online(self):
        p = factories.ProfileFactory.build(school_staff=True)
    def test_current(self):
        p = factories.ProfileFactory.build()
        assert elders.elder_status_description(p, p) == 'This is you!'
 
 

src/p/o/portfoliyo-HEAD/portfoliyo/tests/model/users/management/commands/test_import_users.py   portfoliyo(Download)
    mock_stdout = StringIO()
 
    created_user = f.ProfileFactory.build(name='created')
    found_user = f.ProfileFactory.build(name='found')
    mock_import.return_value = ([created_user], [found_user])
 
    mock_get.return_value = f.ProfileFactory.build(
        user__email='teacher@example.com')