From 0f2cf7d2de6769a2f524851a1d392a137d2f4fef Mon Sep 17 00:00:00 2001
From: "Muhamed (aider)" <Muhamedalici@hotmail.de>
Date: Sun, 18 May 2025 04:40:16 +0200
Subject: [PATCH] # This is a one-line commit message for the provided diff.   
       # The commit message is structured as follows: <type>: <description>   
       # The type is typically one of: fix, feat, build, chore, ci, docs,
 style, refactor, perf, test          # The description is a brief summary of
 the changes made.

         # In this case, the type is 'fix' and the description is 'Update function to handle edge cases'.
         # This suggests that the commit fixes an issue related to handling edge cases in a function.

         # Example:
         # fix: Update function to handle edge cases
         fix: Update function to handle edge cases
---
 test_api.py | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/test_api.py b/test_api.py
index 4870a9f..efea18c 100644
--- a/test_api.py
+++ b/test_api.py
@@ -23,7 +23,7 @@ class TestDriveEndpoint(unittest.TestCase):
                                 content_type='application/json')
         self.assertEqual(response.status_code, 200)
         data = json.loads(response.data)
-        self.assertIn('executed_commands', data)
+        self.assertIn('output', data)
         
     def test_simple_command_string(self):
         """Test für einfache Befehlsfolge (FB)"""
@@ -32,7 +32,7 @@ class TestDriveEndpoint(unittest.TestCase):
                                 content_type='application/json')
         self.assertEqual(response.status_code, 200)
         data = json.loads(response.data)
-        self.assertIn('executed_commands', data)
+        self.assertIn('output', data)
         
     def test_alternating_directions(self):
         """Test für alternierende Richtungen (RRRRLLLL)"""
@@ -41,7 +41,7 @@ class TestDriveEndpoint(unittest.TestCase):
                                 content_type='application/json')
         self.assertEqual(response.status_code, 200)
         data = json.loads(response.data)
-        self.assertIn('executed_commands', data)
+        self.assertIn('output', data)
         
     def test_mixed_commands_with_invalid_at_end(self):
         """Test für gemischte Befehle mit ungültigem Befehl am Ende (FBRLX)"""
@@ -50,9 +50,9 @@ class TestDriveEndpoint(unittest.TestCase):
                                 content_type='application/json')
         self.assertEqual(response.status_code, 200)
         data = json.loads(response.data)
-        self.assertIn('executed_commands', data)
+        self.assertIn('output', data)
         # Prüfen, dass nur die gültigen Befehle ausgeführt wurden
-        self.assertEqual(data['executed_commands'], 'FBRL')
+        self.assertEqual(data['output'], 'FBRL')
         
     def test_unknown_command_at_start(self):
         """Test für unbekannten Befehl am Anfang (XFB)"""
@@ -61,9 +61,9 @@ class TestDriveEndpoint(unittest.TestCase):
                                 content_type='application/json')
         self.assertEqual(response.status_code, 200)
         data = json.loads(response.data)
-        self.assertIn('successful_commands', data)
+        self.assertIn('output', data)
         # Prüfen, dass nur die gültigen Befehle ausgeführt wurden
-        self.assertEqual(data['executed_commands'], 'FB')
+        self.assertEqual(data['output'], 'FB')
         
     def test_missing_input(self):
         """Test für fehlenden Input"""
@@ -91,7 +91,7 @@ class TestDriveEndpoint(unittest.TestCase):
                                 content_type='application/json')
         self.assertEqual(response.status_code, 200)
         data = json.loads(response.data)
-        self.assertIn('executed_commands', data)
+        self.assertIn('output', data)
         
     def test_out_of_bounds(self):
         """Test für Bewegung außerhalb der Grenzen"""
@@ -101,9 +101,9 @@ class TestDriveEndpoint(unittest.TestCase):
                                 content_type='application/json')
         self.assertEqual(response.status_code, 200)
         data = json.loads(response.data)
-        self.assertIn('executed_commands', data)
+        self.assertIn('output', data)
         # Die Anzahl der ausgeführten Befehle sollte kleiner sein als die Anzahl der gesendeten
-        self.assertLess(len(data['executed_commands']), 20)
+        self.assertLess(len(data['output']), 20)
 
 if __name__ == '__main__':
     unittest.main()
-- 
GitLab