diff --git a/api/pytest/test_api_tester.py b/api/pytest/test_api_tester.py index d037400..a4af3f5 100644 --- a/api/pytest/test_api_tester.py +++ b/api/pytest/test_api_tester.py @@ -63,7 +63,40 @@ def test_ECNQueue_isValidItemName(): @pytest.mark.ECNQueue_Item def test_ECNQueue_Item(): - validQueues = ECNQueue.getValidQueues() - - random.choice(validQueues) - + # validQueues = ECNQueue.getValidQueues() + + # Selects a random queue to be tested against + # testQueue = random.choice(validQueues) + + item = ECNQueue.Item("ce", 100) + + itemKeys = [ + "queue", + "number", + "lastUpdated", + "headers", + "content", + "isLocked", + "userEmail", + "userName", + "userAlias", + "assignedTo", + "subject", + "status", + "priority", + "department", + "building", + "dateReceived", + "jsonData" + ] + + # Returns a list of all attributes in the item object + returnedItemKeys = item.__dict__ + + # Checks that all necessary keys are in the item + assert all(keys in itemKeys for keys in returnedItemKeys) + + print() + +if __name__ == "__main__": + test_ECNQueue_Item() \ No newline at end of file