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

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

src/p/o/portfoliyo-HEAD/portfoliyo/tests/notifications/render/test_base.py   portfoliyo(Download)
            timestamp = now - ago
            bulk_post = factories.BulkPostFactory.create(
                author=teacher,
                group=group,
                original_text=msg,

src/p/o/portfoliyo-HEAD/portfoliyo/tests/api/test_resources.py   portfoliyo(Download)
    # a set of posts earlier than this
    earliest_shown = factories.BulkPostFactory.create(
        group__owner=profile, author=profile)
    # these posts will be fetched by the query
    show1 = factories.BulkPostFactory.create(
        group=earliest_shown.group,
        )
    show2 = factories.BulkPostFactory.create(
        group=earliest_shown.group,
        author=profile,
        timestamp=earliest_shown.timestamp - datetime.timedelta(hours=3),
        )
    # this post will be beyond our specified limit
    factories.BulkPostFactory.create(
        group=earliest_shown.group,
    # this post, though recent, is in a different backlog and won't be shown
    factories.BulkPostFactory.create(
        author=profile,
        timestamp=earliest_shown.timestamp - datetime.timedelta(hours=1))
 

src/p/o/portfoliyo-HEAD/portfoliyo/tests/view/village/test_views.py   portfoliyo(Download)
    def test_group(self, db):
        """Given group, returns posts in group."""
        post1 = factories.BulkPostFactory.create()
        post2 = factories.BulkPostFactory.create(group=post1.group)
 
    def test_all_students_group(self, db):
        """Given all-students group, returns posts in group."""
        post1 = factories.BulkPostFactory.create(group=None)
        post2 = factories.BulkPostFactory.create(
            group=None, author=post1.author)
        # this post is all-students and should show up
        factories.BulkPostFactory.create(
            author=teacher, group=None, html_text="I am here.")
        # this is not all-students, and should not.
        factories.BulkPostFactory.create(

src/p/o/portfoliyo-HEAD/portfoliyo/tests/notifications/render/collectors/test_bulk_posts.py   portfoliyo(Download)
def test_not_visible(db):
    """A bulkpost that doesn't show up in any of my villages fails hydration."""
    p = factories.ProfileFactory.create()
    bpc = bulk_posts.BulkPostCollector(p)
    bp = factories.BulkPostFactory.create()