diff --git a/openlp/core/lib/projector/pjlink1.py b/openlp/core/lib/projector/pjlink1.py index 32fd5519c..4fcdae909 100644 --- a/openlp/core/lib/projector/pjlink1.py +++ b/openlp/core/lib/projector/pjlink1.py @@ -101,7 +101,7 @@ class PJLink1(QTcpSocket): self.location = None self.notes = None self.dbid = None if 'dbid' not in kwargs else kwargs['dbid'] - self.location = None if 'location' not in kwargs else kwargs['notes'] + self.location = None if 'location' not in kwargs else kwargs['location'] self.notes = None if 'notes' not in kwargs else kwargs['notes'] # Poll time 20 seconds unless called with something else self.poll_time = 20000 if 'poll_time' not in kwargs else kwargs['poll_time'] * 1000 diff --git a/tests/functional/openlp_core_common/test_projector_utilities.py b/tests/functional/openlp_core_common/test_projector_utilities.py index df06a3efd..17a1ac1bf 100644 --- a/tests/functional/openlp_core_common/test_projector_utilities.py +++ b/tests/functional/openlp_core_common/test_projector_utilities.py @@ -29,9 +29,15 @@ from unittest import TestCase from openlp.core.common import verify_ip_address, md5_hash, qmd5_hash +from tests.resources.projector.data import TEST_PIN, TEST_SALT, TEST_HASH +''' salt = '498e4a67' pin = 'JBMIAProjectorLink' test_hash = '5d8409bc1c3fa39749434aa3a5c38682' +''' +salt = TEST_SALT +pin = TEST_PIN +test_hash = TEST_HASH test_non_ascii_string = '이것은 한국어 시험 문자열' test_non_ascii_hash = 'fc00c7912976f6e9c19099b514ced201' diff --git a/tests/resources/projector/data.py b/tests/resources/projector/data.py index ba922212d..14bcda252 100644 --- a/tests/resources/projector/data.py +++ b/tests/resources/projector/data.py @@ -29,6 +29,14 @@ from openlp.core.lib.projector.db import Projector # Test data TEST_DB = os.path.join('tmp', 'openlp-test-projectordb.sql') +TEST_SALT = '498e4a67' + +TEST_PIN = 'JBMIAProjectorLink' + +TEST_HASH = '5d8409bc1c3fa39749434aa3a5c38682' + +TEST_CONNECT_AUTHENTICATE = 'PJLink 1 {salt}'.format(salt=TEST_SALT) + TEST1_DATA = Projector(ip='111.111.111.111', port='1111', pin='1111',