Skip to content

Commit

Permalink
Add integration test for computing axis percents
Browse files Browse the repository at this point in the history
  • Loading branch information
crcollins committed Dec 20, 2017
1 parent b8acdeb commit 9c7031b
Show file tree
Hide file tree
Showing 2 changed files with 147,072 additions and 0 deletions.
17 changes: 17 additions & 0 deletions chem/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1341,3 +1341,20 @@ def test_parse_without_data(self):
}
response = self.client.post(reverse(views.upload_data), data)
self.assertEqual(response.status_code, 200)

def test_get_percent(self):
name = os.path.join(settings.MEDIA_ROOT, "tests", "4_TON_5_4.log")
with open(name, 'r') as log:
data = {
"files": log,
"options": "percent",
}
response = self.client.post(reverse(views.upload_data), data)
self.assertEqual(response.status_code, 200)
# HOMO Vert
self.assertIn("0.39", response.content)
self.assertIn("95.36%", response.content)
# LUMO Horz
self.assertIn("0.32", response.content)
self.assertIn("65.75%", response.content)

0 comments on commit 9c7031b

Please sign in to comment.