Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Refactored unit tests #356

Merged
merged 9 commits into from
Jul 17, 2016
Merged

Conversation

smarshy
Copy link
Contributor

@smarshy smarshy commented Jul 10, 2016

This PR is to modularize and refactor unit tests using fixtures to eliminate duplication and database objects created. I have added class level fixtures, module level fixtures (wherever the data objects could be reused by multiple classes) and modularized the code to reuse common functions defined in utils.py

The improvements after these modifications can be viewed here

The tests have been grouped into classes based on what type of objects they are sharing so that adding a new test is easier and faster. I have also added comments to tests so that it is easier to relate which data object is used by a test.

Coverage is decreasing due to the new file utils.py

Fixes #344

Related to #369

CC @nidhimj22

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 93.86% when pulling 00c59a6cf21e8ba0f647d7a7ec19bab9adf00e93 on smarshy:refactor-unit into f3eda78 on systers:develop.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 93.852% when pulling e6c0730 on smarshy:refactor-unit into f3eda78 on systers:develop.

@coveralls
Copy link

coveralls commented Jul 11, 2016

Coverage Status

Coverage decreased (-10.9%) to 83.224% when pulling e6c0730 on smarshy:refactor-unit into f3eda78 on systers:develop.

@tapaswenipathak
Copy link
Contributor

This looks good to me. 👍
@nidhimj22 Can this be improved any further?

@nidhimj22
Copy link

LGTM

@tapaswenipathak tapaswenipathak merged commit b69d88f into anitab-org:develop Jul 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restructure unit test Code
4 participants