~nataliabidart/ubuntu-webcatalog/law-and-order.3

« back to all changes in this revision

Viewing changes to src/webcatalog/tests/test_views.py

[r=lukasz-czyzykowski],[bug=962140] Add videos to the application detail page.

Show diffs side-by-side

added added

removed removed

Lines of Context:
366
366
 
367
367
        self.assertNotContains(response, 'Hardware requirements')
368
368
 
 
369
    def test_videos_displayed(self):
 
370
        app = self.factory.make_application()
 
371
        app.applicationmedia_set.create(
 
372
            media_type="video",
 
373
            url="http://example.com/video_iframe.html")
 
374
 
 
375
        response = self.client.get(self.get_app_details_url(app))
 
376
 
 
377
        self.assertContains(response,
 
378
            '<iframe src="http://example.com/video_iframe.html"')
 
379
 
369
380
 
370
381
class ApplicationDetailNoSeriesTestCase(TestCaseWithFactory):
371
382
    def test_renders_latest(self):