Skip to content

Commit

Permalink
fix code quality issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Nation committed Jun 6, 2019
1 parent c7f24f2 commit 0e232a9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions observation_portal/observations/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

from unittest.mock import patch
import copy
import logging

observation = {
"request": {
Expand Down Expand Up @@ -1097,10 +1096,10 @@ def _add_observation(self, state, time_completed):
start=datetime(2016,9,5,22,35,39), end=datetime(2016,9,5,23,35,40))
config_status = ConfigurationStatus.objects.create(observation=observation, configuration=self.requestgroup.requests.first().configurations.first(),
state=state, instrument_name='xx03', guide_camera_name='xx03')
summary = Summary.objects.create(configuration_status=config_status, start=datetime(2016,9,5,22,35,39),
Summary.objects.create(configuration_status=config_status, start=datetime(2016,9,5,22,35,39),
end=datetime(2016,9,5,23,35,40), time_completed=time_completed, state=state)
return observation

def test_with_no_obs_command_reports_no_time_used(self):
command_output = StringIO()
command_err = StringIO()
Expand Down Expand Up @@ -1139,4 +1138,4 @@ def test_with_one_obs_command_reports_dry_run_doesnt_modify_time(self):
self.assertIn(f'Used {time_used} NORMAL hours, 0 RAPID_RESPONSE hours, and 0 TIME_CRITICAL hours', command_output.getvalue())
self.assertIn('is different from existing', command_err.getvalue())
self.time_allocation.refresh_from_db()
self.assertEqual(self.time_allocation.std_time_used, 0)
self.assertEqual(self.time_allocation.std_time_used, 0)

0 comments on commit 0e232a9

Please sign in to comment.