Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] update_test_case function is not working when passing obj = types.TestCase #161

Closed
jkshj21 opened this issue Dec 27, 2023 · 2 comments · Fixed by #171
Closed

[BUG] update_test_case function is not working when passing obj = types.TestCase #161

jkshj21 opened this issue Dec 27, 2023 · 2 comments · Fixed by #171
Assignees
Labels
bug Something isn't working

Comments

@jkshj21
Copy link
Collaborator

jkshj21 commented Dec 27, 2023

Expected Behavior

should update the test case

Current Behavior

it's not updating the test case

Possible Solution

it should update the test case when passing an obj AND passing a key /value

Steps to Reproduce

  1. test_cases_list = TestCases(creds_path=creds_path, agent_id=agent_id).list_test_cases()

  2. test_case_id = [test_cases_list[0].name][0]

  3. Update the display name of the test case
    ex_test_case=test_cases_list[0]
    ex_test_case.display_name = "josh is testing"

  4. tc.update_test_case(test_case_id=test_case_id, obj = ex_test_case)

Context (Environment)

Detailed Description

Possible Implementation

@jkshj21 jkshj21 added the bug Something isn't working label Dec 27, 2023
@kmaphoenix
Copy link
Member

@jkshj21 IIRC the update methods in SCRAPI mimic what the base class was doing, which is why these were implemented in a way that required the kwargs to be provided.

However, because SCRAPI is meant to be an "easier" implementation, it does make sense to support this.
I'm discussing with @MRyderOC offline and we'll come up with a solution that will work for all update methods that can be inherited.

Will circle back soon on this.
Thanks!

@kmaphoenix kmaphoenix self-assigned this Dec 27, 2023
@jkshj21
Copy link
Collaborator Author

jkshj21 commented Dec 28, 2023

ok, thank you!

@MRyderOC MRyderOC linked a pull request Feb 6, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants