Fix typo in projector authentication

This commit is contained in:
Ken Roberts 2016-01-03 00:15:54 -08:00
parent f864a24f9a
commit a023177c4d
3 changed files with 15 additions and 1 deletions

View File

@ -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

View File

@ -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'

View File

@ -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',