formatting issues

This commit is contained in:
Felipe Polo-Wood 2013-12-28 15:03:45 -05:00
parent 1ef910463c
commit 08682a3bd2
2 changed files with 8 additions and 13 deletions

View File

@ -124,8 +124,7 @@ class TestServiceItem(TestCase):
# THEN: We should get back a valid service item
self.assertTrue(service_item.is_valid, 'The new service item should be valid')
self.assertEqual(os.path.normpath(test_file),
os.path.normpath(service_item.get_rendered_frame(0)),
self.assertEqual(os.path.normpath(test_file), os.path.normpath(service_item.get_rendered_frame(0)),
'The first frame should match the path to the image')
self.assertEqual(frame_array, service_item.get_frames()[0],
'The return should match frame array1')
@ -178,22 +177,18 @@ class TestServiceItem(TestCase):
# new layout of service item. The layout use in serviceitem_image_2.osd is actually invalid now.
self.assertTrue(service_item.is_valid, 'The first service item should be valid')
self.assertTrue(service_item2.is_valid, 'The second service item should be valid')
self.assertEqual(test_file1,
os.path.normpath(service_item.get_rendered_frame(0)),
self.assertEqual(test_file1, os.path.normpath(service_item.get_rendered_frame(0)),
'The first frame should match the path to the image')
self.assertEqual(test_file2,
os.path.normpath(service_item2.get_rendered_frame(0)),
self.assertEqual(test_file2, os.path.normpath(service_item2.get_rendered_frame(0)),
'The Second frame should match the path to the image')
# There is a problem with the following two asserts in Windows
# and it is not easily fixable (although it looks simple)
if os.name != 'nt':
self.assertEqual(frame_array1, service_item.get_frames()[0], 'The return should match the frame array1')
self.assertEqual(frame_array2, service_item2.get_frames()[0], 'The return should match the frame array2')
self.assertEqual(test_file1, os.path.normpath(
service_item.get_frame_path(0)),
self.assertEqual(test_file1, os.path.normpath(service_item.get_frame_path(0)),
'The frame path should match the full path to the image')
self.assertEqual(test_file2, os.path.normpath(
service_item2.get_frame_path(0)),
self.assertEqual(test_file2, os.path.normpath(service_item2.get_frame_path(0)),
'The frame path should match the full path to the image')
self.assertEqual(image_name1, service_item.get_frame_title(0),
'The 1st frame title should match the image name')

View File

@ -36,6 +36,9 @@ from openlp.plugins.presentations.lib.presentationcontroller import Presentation
from tests.functional import MagicMock, patch, mock_open
class TestPresentationController(TestCase):
"""
Test the PresentationController.
"""
def setUp(self):
mocked_plugin = MagicMock()
@ -44,9 +47,6 @@ class TestPresentationController(TestCase):
self.document = PresentationDocument(self.presentation, '')
"""
Test the PresentationController.
"""
def constructor_test(self):
"""
Test the Constructor