예제 #1
0
 def test_nightly_feed(self):
     """Nightly Notes feed should be served with public changes"""
     views.nightly_feed(self.request)
     eq_(len(self.last_ctx['notes']), 24)
     eq_(self.last_ctx['notes'][0].id, 787237)
     eq_(self.last_ctx['notes'][1].id, 787246)
     eq_(self.last_ctx['notes'][2].id, 787245)
     eq_(self.last_ctx['notes'][3].id, 787115)
     eq_(self.last_ctx['notes'][4].id, 787108)
예제 #2
0
 def test_nightly_feed(self):
     """Nightly Notes feed should be served with public changes"""
     views.nightly_feed(self.request)
     assert len(self.last_ctx['notes']) == 24
     assert self.last_ctx['notes'][0].id == 787237
     assert self.last_ctx['notes'][1].id == 787246
     assert self.last_ctx['notes'][2].id == 787245
     assert self.last_ctx['notes'][3].id == 787115
     assert self.last_ctx['notes'][4].id == 787108
예제 #3
0
 def test_nightly_feed(self):
     """Nightly Notes feed should be served with public changes"""
     views.nightly_feed(self.request)
     eq_(len(self.last_ctx['notes']), 24)
     eq_(self.last_ctx['notes'][0].id, 787237)
     eq_(self.last_ctx['notes'][1].id, 787246)
     eq_(self.last_ctx['notes'][2].id, 787245)
     eq_(self.last_ctx['notes'][3].id, 787115)
     eq_(self.last_ctx['notes'][4].id, 787108)
예제 #4
0
 def test_nightly_feed(self):
     """Nightly Notes feed should be served with public changes"""
     views.nightly_feed(self.request)
     assert len(self.last_ctx['notes']) == 24
     assert self.last_ctx['notes'][0].id == 787237
     assert self.last_ctx['notes'][1].id == 787246
     assert self.last_ctx['notes'][2].id == 787245
     assert self.last_ctx['notes'][3].id == 787115
     assert self.last_ctx['notes'][4].id == 787108
예제 #5
0
파일: test_base.py 프로젝트: Sancus/bedrock
    def test_nightly_feed(self, get_list_or_404):
        """Nightly Notes feed should be served with public changes"""
        release_1 = Mock()
        release_1.version = '55.0a1'
        release_1.is_public = True
        release_1.release_date = date_parse('2017-03-06T00:00:00')
        release_1.notes.return_value = ([
            Note(id=1, tag='New', note='New 1', is_public=True,
                 modified=date_parse('2017-04-20T13:27:28')),
            Note(id=2, tag='New', note='New 2', is_public=True,
                 modified=date_parse('2017-04-20T13:28:32')),
            Note(id=11, tag='Changed', note='Change 1', is_public=True,
                 modified=date_parse('2017-04-20T13:27:50')),
            Note(id=12, tag='Changed', note='Change 2', is_public=True,
                 modified=date_parse('2017-04-20T13:28:03')),
            Note(id=13, tag='Changed', note='Change 3', is_public=False,
                 modified=date_parse('2017-04-20T13:28:16')),
        ], [
            Note(id=21, tag='', note='Known issue 1', is_public=True,
                 modified=date_parse('2017-04-20T13:30:12')),
        ])

        release_2 = Mock()
        release_2.version = '56.0a1'
        release_2.is_public = True
        release_2.release_date = date_parse('2017-05-08T00:00:00')
        release_2.notes.return_value = ([
            Note(id=31, tag='New', note='New 1', is_public=True,
                 modified=date_parse('2017-05-08T13:27:28')),
        ], [])

        get_list_or_404.return_value = [release_1, release_2]
        views.nightly_feed(self.request)

        eq_(len(self.last_ctx['notes']), 5)
        eq_(self.last_ctx['notes'][0].id, 31)
        eq_(self.last_ctx['notes'][1].id, 2)
        eq_(self.last_ctx['notes'][2].id, 12)
        eq_(self.last_ctx['notes'][3].id, 11)
        eq_(self.last_ctx['notes'][4].id, 1)
예제 #6
0
    def test_nightly_feed(self, get_list_or_404):
        """Nightly Notes feed should be served with public changes"""
        release_1 = Mock()
        release_1.version = '55.0a1'
        release_1.is_public = True
        release_1.release_date = date_parse('2017-03-06T00:00:00')
        release_1.notes.return_value = ([
            Note(id=1, tag='New', note='New 1', is_public=True,
                 modified=date_parse('2017-04-20T13:27:28')),
            Note(id=2, tag='New', note='New 2', is_public=True,
                 modified=date_parse('2017-04-20T13:28:32')),
            Note(id=11, tag='Changed', note='Change 1', is_public=True,
                 modified=date_parse('2017-04-20T13:27:50')),
            Note(id=12, tag='Changed', note='Change 2', is_public=True,
                 modified=date_parse('2017-04-20T13:28:03')),
            Note(id=13, tag='Changed', note='Change 3', is_public=False,
                 modified=date_parse('2017-04-20T13:28:16')),
        ], [
            Note(id=21, tag='', note='Known issue 1', is_public=True,
                 modified=date_parse('2017-04-20T13:30:12')),
        ])

        release_2 = Mock()
        release_2.version = '56.0a1'
        release_2.is_public = True
        release_2.release_date = date_parse('2017-05-08T00:00:00')
        release_2.notes.return_value = ([
            Note(id=31, tag='New', note='New 1', is_public=True,
                 modified=date_parse('2017-05-08T13:27:28')),
        ], [])

        get_list_or_404.return_value = [release_1, release_2]
        views.nightly_feed(self.request)

        eq_(len(self.last_ctx['notes']), 5)
        eq_(self.last_ctx['notes'][0].id, 31)
        eq_(self.last_ctx['notes'][1].id, 2)
        eq_(self.last_ctx['notes'][2].id, 12)
        eq_(self.last_ctx['notes'][3].id, 11)
        eq_(self.last_ctx['notes'][4].id, 1)
예제 #7
0
 def test_nightly_feed_dev_mode(self):
     """Nightly Notes feed should be served with all changes in DEV"""
     views.nightly_feed(self.request)
     assert len(self.last_ctx['notes']) == 26
예제 #8
0
 def test_nightly_feed_dev_mode(self):
     """Nightly Notes feed should be served with all changes in DEV"""
     views.nightly_feed(self.request)
     eq_(len(self.last_ctx['notes']), 26)