swarmauri / swarmauri-sdk

https://swarmauri.com
Apache License 2.0
11 stars 23 forks source link

[Test Case Failure]: GithubTool_test.py #359

Closed MichaelDecent closed 1 hour ago

MichaelDecent commented 2 weeks ago

Test Case

GithubTool_test.py

Pytest Logs

FAILED tests/tools/GithubTool_test.py::test_call[create_repo-kwargs0-Repository 'test_repo' created successfully.] - assert 'Error creati...atus": "403"}' == "Repository '...successfully."

  - Repository 'test_repo' created successfully.
  + Error creating repository: 403 {"message": "Resource not accessible by personal access token", "documentation_url": "https://docs.github.com/rest/repos/repos#create-a-repository-for-the-authenticated-user", "status": "403"}
FAILED tests/tools/GithubTool_test.py::test_call[delete_repo-kwargs1-Repository 'test_repo' deleted successfully.] - assert 'Error deleti...atus": "404"}' == "Repository '...successfully."

  - Repository 'test_repo' deleted successfully.
  + Error deleting repository: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest/repos/repos#get-a-repository", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[get_repo-kwargs2-Repository: test_repo] - assert 'Error retrie...atus": "404"}' == 'Repository: test_repo'

  - Repository: test_repo
  + Error retrieving repository info: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[list_repos-kwargs3-expected3] - AssertionError: assert ['cobycloud/C...ri-sdk-', ...] == ['test_repo']

  At index 0 diff: 'cobycloud/CVApp' != 'test_repo'
  Left contains 17 more items, first extra item: 'cobycloud/gdev_swarm'

  Full diff:
    [
  -     'test_repo',
  +     'cobycloud/CVApp',
  +     'cobycloud/gdev_swarm',
  +     'cobycloud/graph-waveform-processor',
  +     'cobycloud/quantum-error-correction',
  +     'cobycloud/***-notebooks',
  +     'cobycloud/***-sdk-',
  +     'cobycloud/word_list_definitions',
  +     'gslcloud/DjangoD20',
  +     'gslcloud/themonicaapp',
  +     '***/.github',
  +     '***/***-aucplot',
  +     '***/***-counter-component',
  +     '***/***-flipcard',
  +     '***/***',
  +     '***/***-notebooks',
  +     '***/***-piechart',
  +     '***/***-playground',
  +     '***/***-sdk',
    ]
FAILED tests/tools/GithubTool_test.py::test_call[update_repo-kwargs4-Repository 'test_repo' updated successfully.] - assert 'Error updati...atus": "404"}' == "Repository '...successfully."

  - Repository 'test_repo' updated successfully.
  + Error updating repository: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[create_issue-kwargs5-Issue 'New Issue' created successfully.] - assert 'Error creati...atus": "404"}' == "Issue 'New I...successfully."

  - Issue 'New Issue' created successfully.
  + Error creating issue: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[close_issue-kwargs6-Issue '1' closed successfully.] - assert 'Error closin...atus": "404"}' == "Issue '1' cl...successfully."

  - Issue '1' closed successfully.
  + Error closing issue: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[update_issue-kwargs7-Issue '1' updated successfully.] - assert 'Error updati...atus": "404"}' == "Issue '1' up...successfully."

  - Issue '1' updated successfully.
  + Error updating issue: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[list_issues-kwargs8-expected8] - assert 'Error listing issues: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}' == ['Issue 1']
FAILED tests/tools/GithubTool_test.py::test_call[get_issue-kwargs9-Issue #1: Issue Title] - assert 'Error retrie...atus": "404"}' == 'Issue #1: Issue Title'

  - Issue #1: Issue Title
  + Error retrieving issue: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[create_pull-kwargs10-Pull request 'New PR' created successfully.] - assert 'Error creati...atus": "404"}' == 'Pull request...successfully.'

  - Pull request 'New PR' created successfully.
  + Error creating pull request: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[merge_pull-kwargs11-Pull request '1' merged successfully.] - assert 'Error mergin...atus": "404"}' == 'Pull request...successfully.'

  - Pull request '1' merged successfully.
  + Error merging pull request: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[close_pull-kwargs12-Pull request '1' closed successfully.] - assert 'Error closin...atus": "404"}' == 'Pull request...successfully.'

  - Pull request '1' closed successfully.
  + Error closing pull request: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[list_pulls-kwargs13-expected13] - assert 'Error listing pull requests: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}' == ['PR 1']
FAILED tests/tools/GithubTool_test.py::test_call[get_pull-kwargs14-Pull Request #1: PR Title] - assert 'Error retrie...atus": "404"}' == 'Pull Request #1: PR Title'

  - Pull Request #1: PR Title
  + Error retrieving pull request: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[create_commit-kwargs15-Commit created successfully at README.md.] - assert 'Error creati...atus": "404"}' == 'Commit creat...at README.md.'

  - Commit created successfully at README.md.
  + Error creating commit: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[list_commits-kwargs16-expected16] - assert 'Error listing commits: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}' == ['Initial commit']
FAILED tests/tools/GithubTool_test.py::test_call[get_commit-kwargs17-Commit abc123: Initial commit] - assert 'Error retrie...atus": "404"}' == 'Commit abc12...nitial commit'

  - Commit abc123: Initial commit
  + Error retrieving commit: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[compare_commits-kwargs18-Comparison from main to feature-branch:] - assert 'Error compar...atus": "404"}' == 'Comparison f...ature-branch:'

  - Comparison from main to feature-branch:
  + Error comparing commits: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[create_branch-kwargs19-Branch 'new-branch' created successfully.] - assert 'Error creati...atus": "404"}' == "Branch 'new-...successfully."

  - Branch 'new-branch' created successfully.
  + Error creating branch: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[delete_branch-kwargs20-Branch 'new-branch' deleted successfully.] - assert 'Error deleti...atus": "404"}' == "Branch 'new-...successfully."

  - Branch 'new-branch' deleted successfully.
  + Error deleting branch: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[list_branches-kwargs21-expected21] - assert 'Error listing branches: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}' == ['main', 'new-branch']
FAILED tests/tools/GithubTool_test.py::test_call[get_branch-kwargs22-Branch main: abc123] - assert 'Error retrie...atus": "404"}' == 'Branch main: abc123'

  - Branch main: abc123
  + Error retrieving branch: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[add_collaborator-kwargs23-Collaborator 'collaborator' added successfully with 'push' permission.] - assert 'Error adding...atus": "404"}' == "Collaborator...' permission."

  - Collaborator 'collaborator' added successfully with 'push' permission.
  + Error adding collaborator: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[remove_collaborator-kwargs24-Collaborator 'collaborator' removed successfully.] - assert 'Error removi...atus": "404"}' == 'Collaborator...successfully.'

  - Collaborator 'collaborator' removed successfully.
  + Error removing collaborator: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[list_collaborators-kwargs25-expected25] - assert 'Error listing collaborators: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}' == ['collaborator']
FAILED tests/tools/GithubTool_test.py::test_call[check_collaborator-kwargs26-User 'collaborator' is a collaborator.] - assert 'Error checki...atus": "404"}' == "User 'collab...collaborator."

  - User 'collaborator' is a collaborator.
  + Error checking collaborator status: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[create_milestone-kwargs27-Milestone 'v1.0' created successfully.] - assert 'Error creati...atus": "404"}' == "Milestone 'v...successfully."

  - Milestone 'v1.0' created successfully.
  + Error creating milestone: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[close_milestone-kwargs28-Milestone 'v1.0' closed successfully.] - assert 'Error closin...atus": "404"}' == "Milestone 'v...successfully."

  - Milestone 'v1.0' closed successfully.
  + Error closing milestone: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[update_milestone-kwargs29-Milestone 'v1.1' updated successfully.] - assert 'Error updati...atus": "404"}' == "Milestone 'v...successfully."

  - Milestone 'v1.1' updated successfully.
  + Error updating milestone: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[list_milestones-kwargs30-expected30] - assert 'Error listing milestones: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}' == ['v1.0']
FAILED tests/tools/GithubTool_test.py::test_call[get_milestone-kwargs31-Milestone 'v1.0': Description] - assert 'Error retrie...atus": "404"}' == "Milestone 'v...: Description"

  - Milestone 'v1.0': Description
  + Error retrieving milestone: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[create_label-kwargs32-Label 'bug' created successfully.] - TypeError: GithubTool.create_label() got an unexpected keyword argument 'name'
FAILED tests/tools/GithubTool_test.py::test_call[delete_label-kwargs33-Label 'bug' deleted successfully.] - TypeError: GithubTool.delete_label() got an unexpected keyword argument 'name'
FAILED tests/tools/GithubTool_test.py::test_call[update_label-kwargs34-Label 'bug' updated successfully.] - TypeError: GithubTool.update_label() got an unexpected keyword argument 'name'
FAILED tests/tools/GithubTool_test.py::test_call[list_labels-kwargs35-expected35] - assert 'Error listing labels: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}' == ['bug']
FAILED tests/tools/GithubTool_test.py::test_call[get_label-kwargs36-Label 'bug': Description] - TypeError: GithubTool.get_label() got an unexpected keyword argument 'name'
FAILED tests/tools/GithubTool_test.py::test_call[create_webhook-kwargs37-Webhook created successfully.] - assert 'Error creati...atus": "404"}' == 'Webhook crea...successfully.'

  - Webhook created successfully.
  + Error creating webhook: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[delete_webhook-kwargs38-Webhook '1' deleted successfully.] - TypeError: GithubTool.delete_webhook() got an unexpected keyword argument 'webhook_id'
FAILED tests/tools/GithubTool_test.py::test_call[list_webhooks-kwargs39-expected39] - assert 'Error listing webhooks: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}' == ['Webhook 1']
FAILED tests/tools/GithubTool_test.py::test_call[get_webhook-kwargs40-Webhook '1': Config] - TypeError: GithubTool.get_webhook() got an unexpected keyword argument 'webhook_id'
FAILED tests/tools/GithubTool_test.py::test_call[create_gist-kwargs41-Gist created successfully.] - AssertionError: {'file1.txt': {'content': 'Hello World!'}}
FAILED tests/tools/GithubTool_test.py::test_call[delete_gist-kwargs42-Gist 'gist123' deleted successfully.] - assert 'Error deleti...atus": "404"}' == "Gist 'gist12...successfully."

  - Gist 'gist123' deleted successfully.
  + Error deleting gist: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest/gists/gists#get-a-gist", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[update_gist-kwargs43-Gist 'gist123' updated successfully.] - assert 'Error updati...atus": "404"}' == "Gist 'gist12...successfully."

  - Gist 'gist123' updated successfully.
  + Error updating gist: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest/gists/gists#get-a-gist", "status": "404"}
FAILED tests/tools/GithubTool_test.py::test_call[list_gists-kwargs44-expected44] - AssertionError: assert ['d3ce77cac7a...9fb178074176'] == ['Gist 1']

  At index 0 diff: 'd3ce77cac7ae12304f5d9fb178074176' != 'Gist 1'

  Full diff:
    [
  -     'Gist 1',
  +     'd3ce77cac7ae12304f5d9fb178074176',
    ]
FAILED tests/tools/GithubTool_test.py::test_call[get_gist-kwargs45-Gist 'gist123': Description] - assert 'Error retrie...atus": "404"}' == "Gist 'gist123': Description"

  - Gist 'gist123': Description
  + Error retrieving gist: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest/gists/gists#get-a-gist", "status": "404"}

Root Cause

The test call function test_call in GithubTool_test

Potential Solutions

No response

Additional Context (optional)

No response

Type of Test Case

Unit