Repository: DevOps-MBSE/AaC (language: python)

Issue:
📋 [TASK] - Improve Tests in Exclusive Fields Unit Tests
### Parent Feature

#844

### Task Description

As an AaC Test Developer, I want to expand the test coverage in my unit tests, so that I can have more confidence in the robustness of my code.

### Acceptance Criteria

- [x] Update test logic as necessary to expand test coverage. 
  - [x] Happy path and sad path at a minimum
- [x] (Stretch) Incorporate a behave feature file for testing if applicable.
- [x] Run `flake8` on the targeted test directory and address findings.
- [ ] Document any identified gaps.

### Unresolved questions

_No response_


Discussion / hints:

Fix patch:
diff --git a/python/features/check.feature b/python/features/plugins/check.feature
similarity index 100%
rename from python/features/check.feature
rename to python/features/plugins/check.feature
diff --git a/python/features/constraint_assignment_arguments.feature b/python/features/plugins/constraint_assignment_arguments.feature
similarity index 100%
rename from python/features/constraint_assignment_arguments.feature
rename to python/features/plugins/constraint_assignment_arguments.feature
diff --git a/python/features/plugins/exclusive_fields.feature b/python/features/plugins/exclusive_fields.feature
new file mode 100644
index 000000000..e9e19ef4e
--- /dev/null
+++ b/python/features/plugins/exclusive_fields.feature
@@ -0,0 +1,12 @@
+Feature:  Exclusive Fields Evaluation
+
+
+    Scenario:  Check the Shapes constraint spec
+        Given I have the "./shapes/shapes.aac" model
+        When I check the "./shapes/shapes.aac" model
+        Then I should receive a message that the check was successful
+
+    Scenario:  Check the Bad Shapes constraint spec
+        Given I have the "./shapes/bad_shapes.aac" model
+        When I check the "./shapes/bad_shapes.aac" bad model
+        Then I should receive a message that the check was not successful
diff --git a/python/src/aac/__init__.py b/python/src/aac/__init__.py
index 259f68784..c0e146fa3 100644
--- a/python/src/aac/__init__.py
+++ b/python/src/aac/__init__.py
@@ -12,7 +12,7 @@
 import logging
 import os
 
-__version__ = "0.4.33"
+__version__ = "0.4.34"
 
 __log_file_name__ = os.path.join(os.path.dirname(__file__), "aac.log")
 


Test patch:
diff --git a/python/tests/test_aac/plugins/exclusive_fields/test_exclusive_fields.py b/python/tests/test_aac/plugins/exclusive_fields/test_exclusive_fields.py
index d16a4849d..d37017d85 100644
--- a/python/tests/test_aac/plugins/exclusive_fields/test_exclusive_fields.py
+++ b/python/tests/test_aac/plugins/exclusive_fields/test_exclusive_fields.py
@@ -1,40 +1,31 @@
 from unittest import TestCase
-from typing import Tuple
-from click.testing import CliRunner
-from aac.execute.command_line import cli, initialize_cli
-from aac.execute.aac_execution_result import ExecutionStatus
 from aac.context.language_context import LanguageContext
-from os import linesep
-
-
-from aac.plugins.exclusive_fields.exclusive_fields_impl import plugin_name
-
-
 from aac.plugins.exclusive_fields.exclusive_fields_impl import mutually_exclusive_fields
 
 
 class TestExclusiveFields(TestCase):
     def test_mutually_exclusive_fields(self):
-        
+
         context = LanguageContext()
         one_definition = context.parse_and_load(TEST_EXCLUSIVE_FIELDS)
 
         # good data tests
-        for good_def in [GOOD_DATA_1, GOOD_DATA_2, GOOD_DATA_3]:
+        for good_def in [GOOD_DATA_1, GOOD_DATA_2, GOOD_DATA_3, GOOD_DATA_4, GOOD_DATA_5, GOOD_DATA_6]:
             good = context.parse_and_load(good_def)
             result = mutually_exclusive_fields(good[0].instance, one_definition[0], None, ["alpha", "beta", "gamma"])
-            self.assertTrue(result.is_success(), f"Expected success for {good[0].name}")
+            self.assertTrue(result.is_success(), msg=f"Expected success for {good[0].name}")
             context.remove_definitions(good)
 
         # bad data tests
-        for bad_def in [BAD_DATA_1, BAD_DATA_2, BAD_DATA_3, BAD_DATA_4]:
+        for bad_def in [BAD_DATA_1, BAD_DATA_2, BAD_DATA_3, BAD_DATA_4, BAD_DATA_5, BAD_DATA_6, BAD_DATA_7, BAD_DATA_8]:
             bad = context.parse_and_load(bad_def)
             result = mutually_exclusive_fields(bad[0].instance, one_definition[0], None, ["alpha", "beta", "gamma"])
-            self.assertFalse(result.is_success(), f"Expected failure for {bad[0].name}")
+            self.assertFalse(result.is_success(), msg=f"Expected failure for {bad[0].name}")
             context.remove_definitions(bad)
 
         context.remove_definitions(one_definition)
 
+
 TEST_EXCLUSIVE_FIELDS = """
 schema:
     name: One
@@ -56,8 +47,7 @@ def test_mutually_exclusive_fields(self):
             fields:
                 - alpha
                 - beta
-                - gamma  
-
+                - gamma
 """
 
 GOOD_DATA_1 = """
@@ -78,31 +68,79 @@ def test_mutually_exclusive_fields(self):
     gamma: gamma
 """
 
+GOOD_DATA_4 = """
+one:
+    name: GoodFour
+    alpha: alpha
+    alpha: alpha  #  Name & field argument duplication is OK
+"""
+
+GOOD_DATA_5 = """
+one:
+    name: GoodFive
+    alpha: beta
+"""
+
+GOOD_DATA_6 = """
+one:
+    name: GoodSix
+    alpha: beta
+    alpha: gamma
+"""
+
 BAD_DATA_1 = """
 one:
-    name: bad
+    name: BadOne
     alpha: alpha
     beta: beta
 """
 
 BAD_DATA_2 = """
 one:
-    name: bad
+    name: BadTwo
     alpha: alpha
     gamma: gamma
 """
 
 BAD_DATA_3 = """
 one:
-    name: bad
+    name: BadThree
     beta: beta
     gamma: gamma
 """
 
 BAD_DATA_4 = """
 one:
-    name: bad
+    name: BadFour
     alpha: alpha
     beta: beta
     gamma: gamma
-"""
\ No newline at end of file
+"""
+
+BAD_DATA_5 = """
+one:
+    name: BadFive
+    alpha: alpha
+    alpha: #  This intentionally left as blank/whitespace
+"""
+
+BAD_DATA_6 = """
+one:
+    name: BadSix
+    beta: beta
+    alpha: alpha
+"""
+
+BAD_DATA_7 = """
+one:
+    name: BadSeven
+    alpha: #  This intentionally left as blank/whitespace
+    alpha: #  This intentionally left as blank/whitespace
+"""
+
+BAD_DATA_8 = """
+one:
+    name: BadEight
+    alpha: beta
+    beta: gamma
+"""