Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def test_bug_1593882_no_pin_authenticated_connection(self):
- """
- Test bug 1593882 no pin and authenticated request exception
- """
- with self.patch.object(self.pjlink_test, 'socket_timer'), self.patch.object(self.pjlink_test, 'timer'), \
- self.patch.object(self.pjlink_test, 'projectorAuthentication') as mock_authentication, \
- self.patch.object(self.pjlink_test, 'waitForReadyRead') as mock_ready_read, \
- self.patch.object(self.pjlink_test, 'send_command'):
- # GIVEN: Test object and mocks
- pjlink = self.pjlink_test
- pjlink.pin = None
- mock_ready_read.return_value = True
- # WHEN: call with authentication request and pin not set
- pjlink.check_login(data=TEST_CONNECT_AUTHENTICATE)
- # THEN: 'No Authentication' signal should have been sent
- mock_authentication.emit.assert_called_with(pjlink.ip)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement