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

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

src/p/o/portfoliyo-HEAD/portfoliyo/announce/templatetags/announce.py   portfoliyo(Download)
def unread_announcements(profile):
    return announce.get_unread(profile)
 

src/p/o/portfoliyo-HEAD/portfoliyo/tests/announce/test_models.py   portfoliyo(Download)
    a2 = announce.to_all("Something else is happening!")
 
    assert list(announce.get_unread(p1)) == [a1, a2]
    assert list(announce.get_unread(p2)) == [a1, a2]
    assert list(announce.get_unread(p3)) == []
 
    announce.mark_read(p1, a1.id)
 
    assert list(announce.get_unread(p1)) == [a2]
    assert list(announce.get_unread(p2)) == [a1, a2]

src/p/o/portfoliyo-HEAD/portfoliyo/tests/announce/test_views.py   portfoliyo(Download)
def test_mark_announcement_read(no_csrf_client):
    p = factories.ProfileFactory.create(user__email='foo@example.com')
    a = announce.to_all('something')
 
    assert list(announce.get_unread(p)) == [a]
        )
 
    assert list(announce.get_unread(p)) == []