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

Add tests for tcms.bugs.views.New -- Refs #1598 #1791

Merged
merged 1 commit into from
Jul 23, 2020

Conversation

mfonism
Copy link
Contributor

@mfonism mfonism commented Jul 14, 2020

This PR adds (non-permissions related) tests for the view New in tcms/bugs/views.py as per #1598

  • Permissions related tests already exists in tcms/bugs/tests/test_permissions.py

@mfonism
Copy link
Contributor Author

mfonism commented Jul 14, 2020

@atodorov I'm having challenges writing tests for this part of the code:

https://github.com/kiwitcms/Kiwi/blob/master/tcms/bugs/views.py#L112-L114

The thing is, data['_execution'] is a string, and not a django model object, so data['_execution'].case.component.all() doesn't work.

I'm thinking data['_execution'] should be an integer representing the pk of a test_execution which can then be gotten using TestExecution.objects.get()

@mfonism mfonism force-pushed the 2020.07.14/issue/1598 branch from 9d7d2c5 to 3044d07 Compare July 15, 2020 21:35
@mfonism mfonism requested a review from atodorov July 16, 2020 00:58
@mfonism mfonism force-pushed the 2020.07.14/issue/1598 branch 2 times, most recently from 7f57a39 to 9a2e94b Compare July 20, 2020 00:05
@mfonism mfonism requested a review from atodorov July 20, 2020 00:31
@mfonism mfonism force-pushed the 2020.07.14/issue/1598 branch from 9a2e94b to 86c4736 Compare July 20, 2020 11:33
@atodorov atodorov merged commit 6239057 into kiwitcms:master Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants