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

Create some unit tests #75

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

joserc87
Copy link

In this PR I'm crating some unit tests for emailDrone and for farmInfo (reading of some sample data). They should be harmless to run, as they don't connect to any external resource. Nevertheless these commits change the code slightly so we should make sure that the project is still running just fine before merging.

In some later PR I'll create integration tests that checks the API, which is more interesting at the current state of the project.

@@ -170,7 +211,7 @@ def getFarmInfo(saveFile):
g = int(crop.find("tintColor").find("G").text)
b = int(crop.find("tintColor").find("B").text)
days = int(crop.find("dayOfCurrentPhase").text)
o = ((r, g, b), days)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This change seems gratuitous, but it's needed for the test to check agains tthe expected output, which is a list because it comes from a JSON.

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.

1 participant