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

Unit test failure - test_post_submit #202

Open
goneall opened this issue Jul 15, 2020 · 9 comments
Open

Unit test failure - test_post_submit #202

goneall opened this issue Jul 15, 2020 · 9 comments
Labels
good-first-issue Begineer issue gsoc Submit New License Issues related to the submit new license feature

Comments

@goneall
Copy link
Member

goneall commented Jul 15, 2020

The following test_post_submit unit test fails on the master branch:

======================================================================
FAIL: test_post_submit (app.tests.SubmitNewLicenseViewsTestCase)
POST Request for submit a new license
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/spdx-online-tools/spdx-online-tools/src/app/tests.py", line 1229, in test_post_submit
    self.assertEqual(resp.status_code,200)
AssertionError: 500 != 200
@Ugtan
Copy link
Collaborator

Ugtan commented Jul 15, 2020

@goneall I'm getting a different error in my machine.

image

FYI, All the test cases that are failing are the once that were skipped because they require github credentials which is why these tests were not tested. I will take a look at it.

@goneall
Copy link
Member Author

goneall commented Jul 16, 2020

FYI, All the test cases that are failing are the once that were skipped because they require github credentials which is why these tests were not tested. I will take a look at it.

I added the credentials to Git a couple weeks back - this may have exposed an issue that was introduced some time ago. The errors are coming from the automated Git actions on checkin.

@Ugtan Thanks for looking into the issue.

@rtgdk rtgdk added good-first-issue Begineer issue gsoc labels Mar 21, 2021
@SidharajYadav
Copy link

How i can contribute
please guide me
I like to solve this problem

@BanulaKumarage
Copy link
Contributor

Hi @goneall can you clarify the difference between test_post_submit and test_submit_new_license

BanulaKumarage added a commit to BanulaKumarage/spdx-online-tools that referenced this issue Mar 11, 2023
BanulaKumarage added a commit to BanulaKumarage/spdx-online-tools that referenced this issue Mar 11, 2023
@goneall
Copy link
Member Author

goneall commented Mar 11, 2023

@BanulaKumarage Probably a better question for @rtgdk - I'm not as familiar with the unit test code

@BanulaKumarage
Copy link
Contributor

Hi @goneall I made a pr to fix this issue. Can you review it?

@rtgdk
Copy link
Collaborator

rtgdk commented Mar 12, 2023

@BanulaKumarage test_submit_new_license is the test for get request on submit-new-license page while test_post_submit tests the post request. Both of them have different functionalities

  • get -> retrivies page and check the form is displayed with correct values
  • post -> checks with correct data license is submitted successfully

@BanulaKumarage
Copy link
Contributor

Thank you @rtgdk. I got the idea

BanulaKumarage added a commit to BanulaKumarage/spdx-online-tools that referenced this issue Mar 29, 2023
@jlovejoy
Copy link
Member

@rtgdk - what is the status of this?

@jlovejoy jlovejoy added the Submit New License Issues related to the submit new license feature label Jun 21, 2023
goneall added a commit that referenced this issue Jul 2, 2023
goneall added a commit that referenced this issue Jul 2, 2023
Fixes #462 but may re-introduce unit test failures issue #202
by partially reverting PR #444

Signed-off-by: Gary O'Neall <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue Begineer issue gsoc Submit New License Issues related to the submit new license feature
Projects
None yet
Development

No branches or pull requests

6 participants