~jamesh/camera-app/pre-cache-video-thumbnails

« back to all changes in this revision

Viewing changes to tests/autopilot/camera_app/tests/test_gallery_view.py

  • Committer: CI Train Bot
  • Author(s): Leo Arias
  • Date: 2015-07-07 11:09:05 UTC
  • mfrom: (551.3.7 fix1444170-flake8)
  • Revision ID: ci-train-bot@canonical.com-20150707110905-rbnis23aebfmz84a
Fixed the static errors reported by flake8.
Added the check to the debian build tests.
Added python3-flake8 as a build dependency. Fixes: #1444170

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2
 
# Copyright 2014 Canonical
 
2
# Copyright 2014, 2015 Canonical
3
3
#
4
4
# This program is free software: you can redistribute it and/or modify it
5
5
# under the terms of the GNU General Public License version 3, as published
7
7
 
8
8
"""Tests for the Camera App zoom"""
9
9
 
10
 
from testtools.matchers import Equals, NotEquals, GreaterThan, LessThan
 
10
from testtools.matchers import Equals
11
11
from autopilot.matchers import Eventually
12
12
 
13
13
from camera_app.tests import CameraAppTestCase
14
14
 
15
 
import unittest
16
 
import os
17
15
from time import sleep
18
16
 
 
17
 
19
18
class TestCameraGalleryViewMixin(object):
20
19
    def move_from_slideshow_to_photogrid(self):
21
20
        gallery = self.main_window.get_gallery()
47
46
        sleep(1)
48
47
        self.pointing_device.release()
49
48
 
 
49
 
50
50
class TestCameraGalleryView(CameraAppTestCase, TestCameraGalleryViewMixin):
51
51
    """Tests the camera gallery view without media already present"""
52
52
 
104
104
 
105
105
        self.assertThat(hint.visible, Eventually(Equals(False)))
106
106
 
107
 
class TestCameraGalleryViewWithVideo(TestCameraGalleryViewMixin, CameraAppTestCase):
 
107
 
 
108
class TestCameraGalleryViewWithVideo(
 
109
        TestCameraGalleryViewMixin, CameraAppTestCase):
108
110
    """Tests the camera gallery view with video already present"""
109
111
 
110
112
    def setUp(self):
131
133
        spinner = gallery.wait_select_single("ActivityIndicator")
132
134
        self.assertThat(spinner.running, Eventually(Equals(False)))
133
135
 
134
 
class TestCameraGalleryViewWithPhoto(TestCameraGalleryViewMixin, CameraAppTestCase):
 
136
 
 
137
class TestCameraGalleryViewWithPhoto(
 
138
        TestCameraGalleryViewMixin, CameraAppTestCase):
135
139
    """Tests the camera gallery view with photo already present"""
136
140
 
137
141
    def setUp(self):