Evalai: Tests: Inconsistency in unittests for URL Patterns

Created on 23 Apr 2017  路  11Comments  路  Source: Cloud-CV/EvalAI

Issue

The tests for URL Patterns are inconsistent. For reference, see this https://github.com/Cloud-CV/EvalAI/blob/master/tests/unit/challenges/test_urls.py#L68

There is no challenge_phase being created in the test and challenge_pk is passed in the URL instead of challenge_phase_pk.

How to fix

  1. Create a challenge_phase for the challenge created in the tests.
  2. Pass the challenge_phase_pk instead of challenge_pk in the URLs wherever required.
backend bug easy_to_fix

All 11 comments

@deshraj I also noticed that the urls are not tested in a manner that they connect to correct view.
For Reference please see http://stackoverflow.com/questions/18987051/how-do-i-unit-test-django-urls
I think we should also add this. What do you say ?

Yeah I agree. We have not covered the tests where we check if the particular URL pattern matches with the particular view. Please let me know if you want to take lead on this.

But I think it would be great if you can finish the currently assigned issues first before jumping on this one.

@deshraj Yeah, I would like to work on this but after completing all the assigned issues. :+1:

Sounds good.

@RishabhJain2018 Are you planning on working on this? I'll be happy to take over if you have some other things to work on.

@isht3 Yeah sure, you can take this up.

@RishabhJain2018 are we doing it the method you mentioned in the SOF answer?

@isht3 I think so , but I would like to ask @deshraj @taranjeet for their views over this.

@isht3 : as @deshraj said, first we would like to complete this issue. We will open another issue where in we will cover the said thing in SO answer.

Can you take this up quickly and get it released in master?

@taranjeet Sorry, I might've missed this notif. Ill get right on it. :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aka-jain picture aka-jain  路  5Comments

usmanmuhd picture usmanmuhd  路  5Comments

Ayukha picture Ayukha  路  5Comments

w3x10e8 picture w3x10e8  路  4Comments

mrinalwahal picture mrinalwahal  路  4Comments