Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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)
Exemplo n.º 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
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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()
Exemplo n.º 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
Exemplo n.º 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)
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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]
Exemplo n.º 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()
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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()
Exemplo n.º 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()
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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]
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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()
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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()
Exemplo n.º 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()
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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