anitab-forms-backend icon indicating copy to clipboard operation
anitab-forms-backend copied to clipboard

Create unit tests for User info API

Open isabelcosta opened this issue 4 years ago • 9 comments

Description

As a developer, I need have unit tests for each functionality, so that I can be confident when building a new feature, that there are no regression on the platform.

API: GET /api/info

The idea is to come with 3 unit tests to test this API. You may have to mock some information to properly test it.

Resources:

  • Writing tests for Django projects: resource 1 and resource 2
  • Postman documentation about this specific API: https://documenter.getpostman.com/view/11324046/Szzoaw1q?version=latest#15ddb14a-9b28-4545-9b3d-6d363de4a8f1

Acceptance Criteria

Update [Required]

  • [ ] Create 3 unit tests for GET /api/info API

Definition of Done

  • [ ] All of the required items are completed.
  • [x] Approval by 1 mentor.

Estimation

4 hours

isabelcosta avatar Feb 14 '21 13:02 isabelcosta

@isabelcosta I would love to take this up!

decon-harsh avatar Feb 14 '21 14:02 decon-harsh

It's yours @decon-harsh :)

isabelcosta avatar Feb 14 '21 14:02 isabelcosta

This issue is completed, or still something needs to be done ?

b-thebest avatar Mar 08 '21 09:03 b-thebest

I have to mock the zulip functionalities @b-thebest

decon-harsh avatar Mar 08 '21 09:03 decon-harsh

@b-thebest could you help reviewing the PR? https://github.com/anitab-org/anitab-forms-backend/pull/94 Also, @decon-harsh do you need help mocking zulip functionalities? also, did you update your branch? the tests are now passing on branches, because of recent merges

isabelcosta avatar Mar 08 '21 21:03 isabelcosta

Also, @decon-harsh do you need help mocking zulip functionalities? also, did you update your branch? the tests are now passing on branches, because of recent merges

@isabelcosta i updated my branch , but still the tests are falling , it's because of a migration issue .

Comming to mocking zulip functionalities I might need some more time as I am working on an issue in BIT and I have exams too this week ! I will try to do as soon as possible. Will this works or I should prioritise it above?

decon-harsh avatar Mar 08 '21 21:03 decon-harsh

If you could provide an update on this, in the next 3 days is fine, according to our contributing guidelines. It's also okay, to leave this issue if you prefer @decon-harsh I'll take a look at your PR, to see what is failing

isabelcosta avatar Mar 08 '21 21:03 isabelcosta

If you could provide an update on this, in the next 3 days is fine, according to our contributing guidelines. It's also okay, to leave this issue if you prefer @decon-harsh I'll take a look at your PR, to see what is failing

Yes that will work. I will try to do it asap! Thank you

decon-harsh avatar Mar 08 '21 21:03 decon-harsh

@b-thebest could you help reviewing the PR? #94 Also, @decon-harsh do you need help mocking zulip functionalities? also, did you update your branch? the tests are now passing on branches, because of recent merges

Yeah sure

b-thebest avatar Mar 09 '21 03:03 b-thebest