~trb143/openlp/fixes245

« back to all changes in this revision

Viewing changes to tests/interfaces/openlp_core_ui/test_projectorsourceform.py

  • Committer: Raoul Snyman
  • Date: 2016-12-15 21:22:28 UTC
  • mfrom: (2659.1.5 qsize-bug-2.4)
  • Revision ID: raoul@snyman.info-20161215212228-5sb0l8nzpenm17f6
Fix the QSize bug.

Add this to your merge proposal:
--------------------------------
lp:~raoul-snyman/openlp/qsize-2.4 (revision 2664)
[SUCCESS] https://ci.openlp.io/job/Branch-01-Pull/1866/
[SUCCESS] https://ci.openlp.io/job/Branch-02-Functional-Tests/1777/
[SUCCESS] https://ci.openlp.io/job/Branch-03-Interface-Tests/1715/
[SUCCESS] https://ci.openlp.io/job/Branch-04a-Windows_Functional_Tests/1455/
[SUCCESS] https://ci.openlp.io/job/Branch-04b-Windows_Interface_Tests/1045/
[SUCCESS] https:/...

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
Tests for the Projector Source Select form.
26
26
"""
27
 
import logging
28
 
log = logging.getLogger(__name__)
29
 
log.debug('test_projectorsourceform loaded')
30
27
import os
 
28
import time
31
29
from unittest import TestCase
 
30
from unittest.mock import patch
32
31
 
33
32
from PyQt5.QtWidgets import QDialog
34
33
 
35
 
from tests.functional import patch
36
34
from tests.helpers.testmixin import TestMixin
37
35
from tests.resources.projector.data import TEST_DB, TEST1_DATA
38
36
 
39
 
from openlp.core.common import Registry, Settings
 
37
from openlp.core.common import Registry
40
38
from openlp.core.lib.projector.db import ProjectorDB, Projector
41
39
from openlp.core.lib.projector.constants import PJLINK_DEFAULT_CODES, PJLINK_DEFAULT_SOURCES
42
40
from openlp.core.ui.projector.sourceselectform import source_group, SourceSelectSingle
49
47
    :returns: dictionary of valid PJLink source codes grouped by PJLink source group
50
48
    """
51
49
    test_group = {}
52
 
    for group in PJLINK_DEFAULT_SOURCES.keys():
 
50
    for group in PJLINK_DEFAULT_SOURCES:
53
51
        test_group[group] = {}
54
52
    for key in PJLINK_DEFAULT_CODES:
55
53
        test_group[key[0]][key] = PJLINK_DEFAULT_CODES[key]
86
84
        Delete all C++ objects at end so we don't segfault.
87
85
        """
88
86
        self.projectordb.session.close()
89
 
        del(self.projectordb)
90
 
        del(self.projector)
 
87
        del self.projectordb
 
88
        del self.projector
91
89
        retries = 0
92
90
        while retries < 5:
93
91
            try: