예제 #1
0
 def test_unpack(self):
     """Test if unpack fails"""
     controller = Controller(address='unix:abstract=abcde')
     controller.establish_connection = Mock(return_value=None)
     controller.connection = MockConnection(True)
     with pytest.raises(ConnectionReturnError):
         controller.click_video(1, 2, 3, 4)
예제 #2
0
 def test_normal(self):
     """Test if valid"""
     controller = Controller(address='unix:abstract=abcde')
     controller.establish_connection = Mock(return_value=None)
     controller.connection = MockConnection(True)
     face = [(1, 2, 3, 4), (1, 1, 1, 1)]
     controller.mark_tracking(face)
예제 #3
0
 def test_unpack(self):
     """Test if unpack fails"""
     controller = Controller(address='unix:abstract=abcde')
     controller.establish_connection = Mock(return_value=None)
     controller.connection = MockConnection(True)
     with pytest.raises(ConnectionReturnError):
         controller.switch(Controller.VIDEO_CHANNEL_A, 2)
예제 #4
0
 def test_unpack(self):
     """Test if unpack fails"""
     controller = Controller(address='unix:abstract=abcdefghijk')
     controller.establish_connection = Mock(return_value=None)
     controller.connection = MockConnection(True)
     with pytest.raises(ConnectionReturnError):
         controller.set_composite_mode(1)
예제 #5
0
 def test_action_fails(self):
     """Test what happens if the requested action fails"""
     controller = Controller(address='unix:abstract=abcde')
     controller.establish_connection = Mock(return_value=None)
     controller.connection = MockConnection(
         return_variant=True, should_fail=True)
     assert controller.click_video(1, 2, 3, 4) is False
예제 #6
0
 def test_action_fails(self):
     """Test what happens if the requested action fails"""
     controller = Controller(address='unix:abstract=abcde')
     controller.establish_connection = Mock(return_value=None)
     controller.connection = MockConnection(return_variant=True,
                                            should_fail=True)
     assert controller.click_video(1, 2, 3, 4) is False
예제 #7
0
 def test_unpack(self):
     """Test if unpack fails"""
     controller = Controller(address='unix:abstract=abcde')
     controller.establish_connection = Mock(return_value=None)
     controller.connection = MockConnection(True)
     with pytest.raises(ConnectionReturnError):
         controller.click_video(1, 2, 3, 4)
예제 #8
0
 def test_action_fails(self):
     """Test what happens if the requested action fails"""
     controller = Controller(address='unix:abstract=abcde')
     controller.establish_connection = Mock(return_value=None)
     controller.connection = MockConnection(
         return_variant=True, should_fail=True)
     assert controller.switch(Controller.VIDEO_CHANNEL_A, 2) is False
예제 #9
0
 def test_normal(self):
     """Test if valid"""
     controller = Controller(address='unix:abstract=abcde')
     controller.establish_connection = Mock(return_value=None)
     controller.connection = MockConnection(True)
     face = [(1, 2, 3, 4), (1, 1, 1, 1)]
     controller.mark_tracking(face)
예제 #10
0
 def test_unpack(self):
     """Test if unpack fails"""
     controller = Controller(address='unix:abstract=abcdefghijk')
     controller.establish_connection = Mock(return_value=None)
     controller.connection = MockConnection(True)
     with pytest.raises(ConnectionReturnError):
         controller.set_composite_mode(1)
예제 #11
0
 def test_unpack(self):
     """Test if unpack fails"""
     controller = Controller(address='unix:abstract=abcde')
     controller.establish_connection = Mock(return_value=None)
     controller.connection = MockConnection(return_variant=False)
     with pytest.raises(ConnectionReturnError):
         controller.new_record()
예제 #12
0
 def test_action_fails(self):
     """Test what happens if the requested action fails"""
     controller = Controller(address='unix:abstract=abcde')
     controller.establish_connection = Mock(return_value=None)
     controller.connection = MockConnection(return_variant=True,
                                            should_fail=True)
     assert controller.switch(Controller.VIDEO_CHANNEL_A, 2) is False
예제 #13
0
 def test_unpack(self):
     """Test if unpack fails"""
     controller = Controller(address='unix:abstract=abcde')
     controller.establish_connection = Mock(return_value=None)
     controller.connection = MockConnection(return_variant=False)
     with pytest.raises(ConnectionReturnError):
         controller.switch(Controller.VIDEO_CHANNEL_A, 2)
예제 #14
0
 def test_normal_unpack(self):
     """Test if valid"""
     controller = Controller(address='unix:abstract=abcdef')
     controller.connection = MockConnection(return_variant=True)
     assert controller.get_encode_port() == 3002
예제 #15
0
 def test_normal_unpack(self):
     """Test if valid"""
     controller = Controller(address='unix:abstract=abcdef')
     controller.establish_connection = Mock(return_value=None)
     controller.connection = MockConnection(False)
     assert controller.set_composite_mode(1) is True
예제 #16
0
 def test_normal_unpack(self):
     """Test if valid"""
     controller = Controller(address='unix:abstract=abcdef')
     controller.connection = MockConnection(False)
     controller.parse_preview_ports = Mock(return_value=[3001, 3002])
     assert controller.get_preview_ports() == [3001, 3002]
예제 #17
0
 def test_unpack(self):
     """Test if unpack fails"""
     controller = Controller(address='unix:abstract=abcdefghijk')
     controller.connection = MockConnection(True)
     with pytest.raises(ConnectionReturnError):
         controller.get_preview_ports()
예제 #18
0
 def test_normal_unpack(self):
     """Test if valid"""
     controller = Controller(address='unix:abstract=abcdef')
     controller.connection = MockConnection(False)
     assert controller.get_audio_port() == 4000
예제 #19
0
 def test_normal_unpack(self):
     """Test if valid"""
     controller = Controller(address='unix:abstract=abcdef')
     controller.establish_connection = Mock(return_value=None)
     controller.connection = MockConnection(False)
     assert controller.set_composite_mode(1) is True
예제 #20
0
 def test_unpack(self):
     """Test if unpack fails"""
     controller = Controller(address='unix:abstract=abcdefghijk')
     controller.connection = MockConnection(return_variant=False)
     with pytest.raises(ConnectionReturnError):
         controller.get_audio_port()
예제 #21
0
 def test_unpack(self):
     """Test when values cant unpack"""
     controller = Controller(address='unix:abstract=abcdefghijk')
     controller.connection = MockConnection(True)
     with pytest.raises(ConnectionReturnError):
         controller.get_compose_port()
예제 #22
0
 def test_normal_unpack(self):
     """Test if valid"""
     controller = Controller(address='unix:abstract=abcdef')
     controller.establish_connection = Mock(return_value=None)
     controller.connection = MockConnection(False)
     assert controller.click_video(1, 2, 3, 4) is True
예제 #23
0
 def test_normal_unpack(self):
     """Test if valid"""
     controller = Controller(address='unix:abstract=abcdef')
     controller.establish_connection = Mock(return_value=None)
     controller.connection = MockConnection(return_variant=True)
     assert controller.switch(Controller.VIDEO_CHANNEL_A, 2) is True
예제 #24
0
 def test_normal_unpack(self):
     """Test if valid"""
     controller = Controller(address='unix:abstract=abcdef')
     controller.establish_connection = Mock(return_value=None)
     controller.connection = MockConnection(return_variant=True)
     assert controller.adjust_pip(1, 2, 3, 4) == 1
예제 #25
0
 def test_normal_unpack(self):
     """Test if valid"""
     controller = Controller(address='unix:abstract=abcdef')
     controller.establish_connection = Mock(return_value=None)
     controller.connection = MockConnection(return_variant=True)
     assert controller.get_composite_mode() is Controller.COMPOSITE_NONE
예제 #26
0
 def test_normal_unpack(self):
     """Test if valid"""
     controller = Controller(address='unix:abstract=abcdef')
     controller.connection = MockConnection(False)
     assert controller.get_audio_port() == 4000
예제 #27
0
 def test_normal_unpack(self):
     """Test if valid"""
     controller = Controller(address='unix:abstract=abcdef')
     controller.connection = MockConnection(False)
     controller.parse_preview_ports = Mock(return_value=[3001, 3002])
     assert controller.get_preview_ports() == [3001, 3002]
예제 #28
0
 def test_normal_unpack(self):
     """Test when valid"""
     controller = Controller(address='unix:abstract=abcdef')
     controller.connection = MockConnection(False)
     assert controller.get_compose_port() == 3001
예제 #29
0
 def test_normal_unpack(self):
     """Test if valid"""
     controller = Controller(address='unix:abstract=abcdef')
     controller.establish_connection = Mock(return_value=None)
     controller.connection = MockConnection(return_variant=True)
     assert controller.adjust_pip(1, 2, 3, 4) == 1
예제 #30
0
 def test_unpack(self):
     """Test if unpack fails"""
     controller = Controller(address='unix:abstract=abcdefghijk')
     controller.connection = MockConnection(True)
     with pytest.raises(ConnectionReturnError):
         controller.get_preview_ports()
예제 #31
0
 def test_normal_unpack(self):
     """Test if valid"""
     controller = Controller(address='unix:abstract=abcdef')
     controller.establish_connection = Mock(return_value=None)
     controller.connection = MockConnection(False)
     assert controller.switch(Controller.VIDEO_CHANNEL_A, 2) is True
예제 #32
0
 def test_normal_unpack(self):
     """Test if valid"""
     controller = Controller(address='unix:abstract=abcdef')
     controller.establish_connection = Mock(return_value=None)
     controller.connection = MockConnection(False)
     assert controller.click_video(1, 2, 3, 4) is True
예제 #33
0
 def test_unpack(self):
     """Test if unpack fails"""
     controller = Controller(address='unix:abstract=abcdefghijk')
     controller.connection = MockConnection(return_variant=False)
     with pytest.raises(ConnectionReturnError):
         controller.get_audio_port()
예제 #34
0
 def test_unpack(self):
     """Test when values cant unpack"""
     controller = Controller(address='unix:abstract=abcdefghijk')
     controller.connection = MockConnection(True)
     with pytest.raises(ConnectionReturnError):
         controller.get_compose_port()
예제 #35
0
 def test_normal_unpack(self):
     """Test if valid"""
     controller = Controller(address='unix:abstract=abcdef')
     controller.establish_connection = Mock(return_value=None)
     controller.connection = MockConnection(return_variant=True)
     assert controller.get_composite_mode() is Controller.COMPOSITE_NONE
예제 #36
0
 def test_normal_unpack(self):
     """Test when valid"""
     controller = Controller(address='unix:abstract=abcdef')
     controller.connection = MockConnection(False)
     assert controller.get_compose_port() == 3001
예제 #37
0
 def test_normal_unpack(self):
     """Test if valid"""
     controller = Controller(address='unix:abstract=abcdef')
     controller.connection = MockConnection(return_variant=True)
     assert controller.get_encode_port() == 3002