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

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

src/p/o/portfoliyo-HEAD/portfoliyo/tests/model/village/test_unread.py   portfoliyo(Download)
    profile = factories.ProfileFactory.create()
 
    unread.mark_unread(post, profile)
 
    assert unread.is_unread(post, profile)
    profile = factories.ProfileFactory.create()
 
    unread.mark_unread(post, profile)
 
    assert unread.all_unread(post.student, profile) == {str(post.id)}
def test_mark_read(db, redis):
    """Can mark a post as read."""
    post = factories.PostFactory.create()
    profile = factories.ProfileFactory.create()
    unread.mark_unread(post, profile)
    other_village_post = factories.PostFactory.create()
    profile = factories.ProfileFactory.create()
    unread.mark_unread(post1, profile)
    unread.mark_unread(post2, profile)
    unread.mark_unread(other_village_post, profile)

src/p/o/portfoliyo-HEAD/portfoliyo/tests/view/village/test_views.py   portfoliyo(Download)
        unread_post = factories.PostFactory.create(
            student=read_post.student)
        model.unread.mark_unread(unread_post, profile)
 
        expected = [(read_post.id, False), (unread_post.id, True)]
        post = factories.PostFactory.create(student=rel.student)
        post2 = factories.PostFactory.create(student=rel.student)
        unread.mark_unread(post, rel.elder)
        unread.mark_unread(post2, rel.elder)
 
        post = factories.PostFactory.create(student=rel.student)
        post2 = factories.PostFactory.create(student=rel.student)
        unread.mark_unread(post, rel.elder)
        unread.mark_unread(post2, rel.elder)
 

src/p/o/portfoliyo-HEAD/portfoliyo/tests/api/test_resources.py   portfoliyo(Download)
            from_profile__school_staff=True)
        post = factories.PostFactory.create(student=rel.student)
        unread.mark_unread(post, rel.elder)
 
        response = no_csrf_client.get(
        post = factories.PostFactory.create(student=rel.student)
        post2 = factories.PostFactory.create(student=rel2.student)
        unread.mark_unread(post, rel.elder)
        unread.mark_unread(post2, rel.elder)
 
        group.students.add(rel.student)
        group.students.add(other_rel.student)
        unread.mark_unread(post, rel.elder)
        unread.mark_unread(other_post, rel.elder)