(self)
| 42 | |
| 43 | class TestCommandAPI(TestCase): |
| 44 | def setUp(self): |
| 45 | self.app = Flask(__name__) |
| 46 | self.client = self.app.test_client() |
| 47 | |
| 48 | @self.app.route('/api/v1/executecommand', methods=['POST']) |
| 49 | def execute_command(): |
| 50 | command = "ls" |
| 51 | response, status_code = CommandExecutor.execute(command) |
| 52 | return {'response': response}, status_code |
| 53 | |
| 54 | def test_validate_command(self): |
| 55 | """Test command validation""" |
nothing calls this directly
no outgoing calls
no test coverage detected