示例#1
0
    def test_manager(self):
        mock_manager = MagicMock(spec=PyFilterManager)

        op = operation.PyFilterOperation(None)
        op._manager = mock_manager

        self.assertEqual(op.manager, mock_manager)
示例#2
0
    def test_data(self):
        data = {"key": "value"}

        op = operation.PyFilterOperation(None)
        op._data = data

        self.assertEqual(op.data, data)
示例#3
0
    def test___init__(self, mocker):
        """Test object initialization."""
        mock_manager = mocker.MagicMock(spec=PyFilterManager)

        op = operation.PyFilterOperation(mock_manager)

        assert op._data == {}
        assert op._manager == mock_manager
示例#4
0
 def _create():
     return operation.PyFilterOperation(None)
示例#5
0
    def test_should_run(self):
        op = operation.PyFilterOperation(None)

        self.assertTrue(op.should_run())
示例#6
0
    def test_process_parsed_args(self):
        op = operation.PyFilterOperation(None)

        self.assertIsNone(op.process_parsed_args(None))
示例#7
0
    def test___init__(self):
        mock_manager = MagicMock(spec=PyFilterManager)
        op = operation.PyFilterOperation(mock_manager)

        self.assertEqual(op._data, {})
        self.assertEqual(op._manager, mock_manager)