value edit; test fix

This commit is contained in:
GotPPay
2017-11-23 17:19:42 +01:00
parent efb4547a37
commit 3eb3463d50
24 changed files with 550 additions and 488 deletions

View File

@@ -171,11 +171,11 @@ class ArraySummaryTest(unittest.TestCase):
def test_shows_summary_values(self):
self.fill_in_site_characterization_data()
self.upload_csv_file(file='test/fixtures/input_single_tilt_csv_for_bom.csv')
self.assert_summary_values_column_data(1, 'Total System Weight (lbs)', '216,074')
self.assert_summary_values_column_data(2, 'Max PSF', '9.11')
self.assert_summary_values_column_data(3, 'Avg PSF', '5.05')
self.assert_summary_values_column_data(4, 'Total Anchors', '421')
self.assert_summary_values_column_data(5, 'Total Ballast', '10,150')
self.assert_summary_values_column_data(1, 'Total System Weight (lbs)', '217,409')
self.assert_summary_values_column_data(2, 'Max PSF', '9.36')
self.assert_summary_values_column_data(3, 'Avg PSF', '5.08')
self.assert_summary_values_column_data(4, 'Total Anchors', '422')
self.assert_summary_values_column_data(5, 'Total Ballast', '10,448')
def test_shows_seismic_placement_interval(self):
self.fill_in_site_characterization_data(system_type=SystemType.dualTilt)
@@ -212,26 +212,26 @@ class ArraySummaryTest(unittest.TestCase):
eq_(response.content_type, "application/json")
data = json.loads(response.data.decode())
expected = [
{'data': {'ballast': 7, 'cross_trays': 0, 'link_trays': 2, 'panel_id': 1, 'panel_type': 2, 'psf': 4.94, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'A'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 2, 'cross_trays': 0, 'link_trays': 2, 'panel_id': 2, 'panel_type': 2, 'psf': 3.12, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'B'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 11, 'cross_trays': 0, 'link_trays': 2, 'panel_id': 3, 'panel_type': 1, 'psf': 6.47, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'A'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 11, 'cross_trays': 0, 'link_trays': 2, 'panel_id': 4, 'panel_type': 1, 'psf': 6.47, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'A'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 7, 'cross_trays': 0, 'link_trays': 2, 'panel_id': 1, 'panel_type': 2, 'psf': 4.91, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'A'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 2, 'cross_trays': 0, 'link_trays': 2, 'panel_id': 2, 'panel_type': 2, 'psf': 3.1, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'B'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 11, 'cross_trays': 0, 'link_trays': 2, 'panel_id': 3, 'panel_type': 1, 'psf': 6.48, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'A'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 11, 'cross_trays': 0, 'link_trays': 2, 'panel_id': 4, 'panel_type': 1, 'psf': 6.48, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'A'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 6, 'cross_trays': 0, 'link_trays': 2, 'panel_id': 5, 'panel_type': 1, 'psf': 4.57, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'B'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 2, 'cross_trays': 0, 'link_trays': 2, 'panel_id': 6, 'panel_type': 2, 'psf': 3.12, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'B'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 2, 'cross_trays': 0, 'link_trays': 2, 'panel_id': 6, 'panel_type': 2, 'psf': 3.1, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'B'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 0, 'cross_trays': 0, 'link_trays': 0, 'panel_id': 7, 'panel_type': 4, 'psf': 2.26, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'B'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 2, 'cross_trays': 0, 'link_trays': 1, 'panel_id': 8, 'panel_type': 3, 'psf': 2.98, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'B'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 2, 'cross_trays': 0, 'link_trays': 1, 'panel_id': 9, 'panel_type': 3, 'psf': 2.98, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'B'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 2, 'cross_trays': 0, 'link_trays': 1, 'panel_id': 8, 'panel_type': 3, 'psf': 3.0, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'B'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 2, 'cross_trays': 0, 'link_trays': 1, 'panel_id': 9, 'panel_type': 3, 'psf': 3.0, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'B'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 0, 'cross_trays': 0, 'link_trays': 0, 'panel_id': 10, 'panel_type': 4, 'psf': 2.26, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'B'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 2, 'cross_trays': 0, 'link_trays': 2, 'panel_id': 11, 'panel_type': 2, 'psf': 3.12, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'B'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 2, 'cross_trays': 0, 'link_trays': 1, 'panel_id': 12, 'panel_type': 3, 'psf': 2.98, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'B'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 2, 'cross_trays': 0, 'link_trays': 1, 'panel_id': 13, 'panel_type': 3, 'psf': 2.98, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'B'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 2, 'cross_trays': 0, 'link_trays': 1, 'panel_id': 14, 'panel_type': 3, 'psf': 2.98, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'B'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 2, 'cross_trays': 0, 'link_trays': 2, 'panel_id': 11, 'panel_type': 2, 'psf': 3.1, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'B'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 2, 'cross_trays': 0, 'link_trays': 1, 'panel_id': 12, 'panel_type': 3, 'psf': 3.0, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'B'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 2, 'cross_trays': 0, 'link_trays': 1, 'panel_id': 13, 'panel_type': 3, 'psf': 3.0, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'B'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 2, 'cross_trays': 0, 'link_trays': 1, 'panel_id': 14, 'panel_type': 3, 'psf': 3.0, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'B'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 6, 'cross_trays': 0, 'link_trays': 2, 'panel_id': 15, 'panel_type': 1, 'psf': 4.57, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'B'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 6, 'cross_trays': 0, 'link_trays': 2, 'panel_id': 16, 'panel_type': 1, 'psf': 4.57, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'B'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 6, 'cross_trays': 0, 'link_trays': 2, 'panel_id': 17, 'panel_type': 1, 'psf': 4.57, 'seismic_anchors': 0, 'subarray': 7, 'wind_anchors': 0, 'wind_zones': 'B'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 11, 'cross_trays': 0, 'link_trays': 2, 'panel_id': 18, 'panel_type': 1, 'psf': 6.47, 'seismic_anchors': 0, 'subarray': 8, 'wind_anchors': 0, 'wind_zones': 'A'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 6, 'cross_trays': 0, 'link_trays': 1, 'panel_id': 19, 'panel_type': 3, 'psf': 4.48, 'seismic_anchors': 0, 'subarray': 8, 'wind_anchors': 0, 'wind_zones': 'A'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 11, 'cross_trays': 0, 'link_trays': 2, 'panel_id': 20, 'panel_type': 1, 'psf': 6.47, 'seismic_anchors': 0, 'subarray': 8, 'wind_anchors': 0, 'wind_zones': 'A'}, 'height': 1, 'width': 1.5}
{'data': {'ballast': 11, 'cross_trays': 0, 'link_trays': 2, 'panel_id': 18, 'panel_type': 1, 'psf': 6.48, 'seismic_anchors': 0, 'subarray': 8, 'wind_anchors': 0, 'wind_zones': 'A'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 6, 'cross_trays': 0, 'link_trays': 1, 'panel_id': 19, 'panel_type': 3, 'psf': 4.5, 'seismic_anchors': 0, 'subarray': 8, 'wind_anchors': 0, 'wind_zones': 'A'}, 'height': 1, 'width': 1.5},
{'data': {'ballast': 11, 'cross_trays': 0, 'link_trays': 2, 'panel_id': 20, 'panel_type': 1, 'psf': 6.48, 'seismic_anchors': 0, 'subarray': 8, 'wind_anchors': 0, 'wind_zones': 'A'}, 'height': 1, 'width': 1.5}
]
# Removing these keys as they get calculated differently in CircleCI
@@ -290,28 +290,28 @@ class ArraySummaryTest(unittest.TestCase):
"status": "success",
"error": None,
"panel_data": [
{'x': 0, 'y': 0, 'height': 1, 'width': 1, 'data': {'subarray': 8, 'psf': 2.08, 'wind_zones': 'H', 'ballast': 0, 'panel_type': 1, 'cross_trays': 0, 'wind_anchors': 1, 'link_trays': 0, 'seismic_anchors': 2, 'panel_id': 1}},
{'x': 0, 'y': 0, 'height': 1, 'width': 1, 'data': {'subarray': 8, 'psf': 2.04, 'wind_zones': 'H', 'ballast': 0, 'panel_type': 3, 'cross_trays': 0, 'wind_anchors': 1, 'link_trays': 2, 'seismic_anchors': 0, 'panel_id': 2}},
{'x': 0, 'y': 0, 'height': 1, 'width': 1, 'data': {'subarray': 8, 'psf': 2.08, 'wind_zones': 'H', 'ballast': 0, 'panel_type': 1, 'cross_trays': 0, 'wind_anchors': 1, 'link_trays': 0, 'seismic_anchors': 0, 'panel_id': 3}},
{'x': 0, 'y': 0, 'height': 1, 'width': 1, 'data': {'subarray': 8, 'psf': 2.08, 'wind_zones': 'H', 'ballast': 0, 'panel_type': 1, 'cross_trays': 0, 'wind_anchors': 1, 'link_trays': 0, 'seismic_anchors': 0, 'panel_id': 4}},
{'x': 0, 'y': 0, 'height': 1, 'width': 1, 'data': {'subarray': 8, 'psf': 2.04, 'wind_zones': 'H', 'ballast': 0, 'panel_type': 3, 'cross_trays': 0, 'wind_anchors': 1, 'link_trays': 2, 'seismic_anchors': 0, 'panel_id': 5}},
{'x': 0, 'y': 0, 'height': 1, 'width': 1, 'data': {'subarray': 8, 'psf': 2.04, 'wind_zones': 'H', 'ballast': 0, 'panel_type': 3, 'cross_trays': 0, 'wind_anchors': 1, 'link_trays': 2, 'seismic_anchors': 0, 'panel_id': 6}},
{'x': 0, 'y': 0, 'height': 1, 'width': 1, 'data': {'subarray': 8, 'psf': 2.04, 'wind_zones': 'H', 'ballast': 0, 'panel_type': 3, 'cross_trays': 0, 'wind_anchors': 1, 'link_trays': 2, 'seismic_anchors': 0, 'panel_id': 7}},
{'x': 0, 'y': 0, 'height': 1, 'width': 1, 'data': {'subarray': 8, 'psf': 2.08, 'wind_zones': 'H', 'ballast': 0, 'panel_type': 1, 'cross_trays': 0, 'wind_anchors': 1, 'link_trays': 0, 'seismic_anchors': 0, 'panel_id': 8}},
{'x': 0, 'y': 0, 'height': 1, 'width': 1, 'data': {'subarray': 8, 'psf': 1.89, 'wind_zones': 'H', 'ballast': 0, 'panel_type': 2, 'cross_trays': 0, 'wind_anchors': 1, 'link_trays': 0, 'seismic_anchors': 0, 'panel_id': 9}},
{'x': 0, 'y': 0, 'height': 1, 'width': 1, 'data': {'subarray': 8, 'psf': 1.89, 'wind_zones': 'H', 'ballast': 0, 'panel_type': 2, 'cross_trays': 0, 'wind_anchors': 1, 'link_trays': 0, 'seismic_anchors': 0, 'panel_id': 10}},
{'x': 0, 'y': 0, 'height': 1, 'width': 1, 'data': {'subarray': 8, 'psf': 1.89, 'wind_zones': 'I', 'ballast': 0, 'panel_type': 2, 'cross_trays': 0, 'wind_anchors': 1, 'link_trays': 0, 'seismic_anchors': 0, 'panel_id': 11}},
{'x': 0, 'y': 0, 'height': 1, 'width': 1, 'data': {'subarray': 8, 'psf': 1.86, 'wind_zones': 'H', 'ballast': 0, 'panel_type': 4, 'cross_trays': 0, 'wind_anchors': 1, 'link_trays': 0, 'seismic_anchors': 0, 'panel_id': 12}},
{'x': 0, 'y': 0, 'height': 1, 'width': 1, 'data': {'subarray': 8, 'psf': 1.86, 'wind_zones': 'H', 'ballast': 0, 'panel_type': 4, 'cross_trays': 0, 'wind_anchors': 1, 'link_trays': 0, 'seismic_anchors': 0, 'panel_id': 13}},
{'x': 0, 'y': 0, 'height': 1, 'width': 1, 'data': {'subarray': 8, 'psf': 1.86, 'wind_zones': 'H', 'ballast': 0, 'panel_type': 4, 'cross_trays': 0, 'wind_anchors': 1, 'link_trays': 0, 'seismic_anchors': 0, 'panel_id': 14}},
{'x': 0, 'y': 0, 'height': 1, 'width': 1, 'data': {'subarray': 8, 'psf': 1.86, 'wind_zones': 'H', 'ballast': 0, 'panel_type': 4, 'cross_trays': 0, 'wind_anchors': 1, 'link_trays': 0, 'seismic_anchors': 0, 'panel_id': 15}},
{'x': 0, 'y': 0, 'height': 1, 'width': 1, 'data': {'subarray': 8, 'psf': 1.86, 'wind_zones': 'H', 'ballast': 0, 'panel_type': 4, 'cross_trays': 0, 'wind_anchors': 1, 'link_trays': 0, 'seismic_anchors': 0, 'panel_id': 16}},
{'x': 0, 'y': 0, 'height': 1, 'width': 1, 'data': {'subarray': 8, 'psf': 1.86, 'wind_zones': 'H', 'ballast': 0, 'panel_type': 4, 'cross_trays': 0, 'wind_anchors': 1, 'link_trays': 0, 'seismic_anchors': 0, 'panel_id': 17}},
{'x': 0, 'y': 0, 'height': 1, 'width': 1, 'data': {'subarray': 8, 'psf': 1.89, 'wind_zones': 'H', 'ballast': 0, 'panel_type': 2, 'cross_trays': 0, 'wind_anchors': 1, 'link_trays': 0, 'seismic_anchors': 0, 'panel_id': 18}},
{'x': 0, 'y': 0, 'height': 1, 'width': 1, 'data': {'subarray': 8, 'psf': 1.89, 'wind_zones': 'I', 'ballast': 0, 'panel_type': 2, 'cross_trays': 0, 'wind_anchors': 1, 'link_trays': 0, 'seismic_anchors': 0, 'panel_id': 19}},
{'data': {'ballast': 0, 'cross_trays': 0, 'link_trays': 0, 'panel_id': 1, 'panel_type': 1, 'psf': 1.95, 'seismic_anchors': 2, 'subarray': 8, 'wind_anchors': 1, 'wind_zones': 'H'}, 'height': 1, 'width': 1, 'x': 0.0, 'y': 0.0},
{'data': {'ballast': 0, 'cross_trays': 0, 'link_trays': 2, 'panel_id': 2, 'panel_type': 3, 'psf': 1.88, 'seismic_anchors': 0, 'subarray': 8, 'wind_anchors': 1, 'wind_zones': 'H'}, 'height': 1, 'width': 1, 'x': 0.0, 'y': 0.0},
{'data': {'ballast': 0, 'cross_trays': 0, 'link_trays': 0, 'panel_id': 3, 'panel_type': 1, 'psf': 1.95, 'seismic_anchors': 0, 'subarray': 8, 'wind_anchors': 1, 'wind_zones': 'H'}, 'height': 1, 'width': 1, 'x': 0.0, 'y': 0.0},
{'data': {'ballast': 0, 'cross_trays': 0, 'link_trays': 0, 'panel_id': 4, 'panel_type': 1, 'psf': 1.95, 'seismic_anchors': 0, 'subarray': 8, 'wind_anchors': 1, 'wind_zones': 'H'}, 'height': 1, 'width': 1, 'x': 0.0, 'y': 0.0},
{'data': {'ballast': 0, 'cross_trays': 0, 'link_trays': 2, 'panel_id': 5, 'panel_type': 3, 'psf': 1.88, 'seismic_anchors': 0, 'subarray': 8, 'wind_anchors': 1, 'wind_zones': 'H'}, 'height': 1, 'width': 1, 'x': 0.0, 'y': 0.0},
{'data': {'ballast': 0, 'cross_trays': 0, 'link_trays': 2, 'panel_id': 6, 'panel_type': 3, 'psf': 1.88, 'seismic_anchors': 0, 'subarray': 8, 'wind_anchors': 1, 'wind_zones': 'H'}, 'height': 1, 'width': 1, 'x': 0.0, 'y': 0.0},
{'data': {'ballast': 0, 'cross_trays': 0, 'link_trays': 2, 'panel_id': 7, 'panel_type': 3, 'psf': 1.88, 'seismic_anchors': 0, 'subarray': 8, 'wind_anchors': 1, 'wind_zones': 'H'}, 'height': 1, 'width': 1, 'x': 0.0, 'y': 0.0},
{'data': {'ballast': 0, 'cross_trays': 0, 'link_trays': 0, 'panel_id': 8, 'panel_type': 1, 'psf': 1.95, 'seismic_anchors': 0, 'subarray': 8, 'wind_anchors': 1, 'wind_zones': 'H'}, 'height': 1, 'width': 1, 'x': 0.0, 'y': 0.0},
{'data': {'ballast': 0, 'cross_trays': 0, 'link_trays': 0, 'panel_id': 9, 'panel_type': 2, 'psf': 1.84, 'seismic_anchors': 0, 'subarray': 8, 'wind_anchors': 1, 'wind_zones': 'H'}, 'height': 1, 'width': 1, 'x': 0.0, 'y': 0.0},
{'data': {'ballast': 0, 'cross_trays': 0, 'link_trays': 0, 'panel_id': 10, 'panel_type': 2, 'psf': 1.84, 'seismic_anchors': 0, 'subarray': 8, 'wind_anchors': 1, 'wind_zones': 'H'}, 'height': 1, 'width': 1, 'x': 0.0, 'y': 0.0},
{'data': {'ballast': 0, 'cross_trays': 0, 'link_trays': 0, 'panel_id': 11, 'panel_type': 2, 'psf': 1.84, 'seismic_anchors': 0, 'subarray': 8, 'wind_anchors': 1, 'wind_zones': 'I'}, 'height': 1, 'width': 1, 'x': 0.0, 'y': 0.0},
{'data': {'ballast': 0, 'cross_trays': 0, 'link_trays': 0, 'panel_id': 12, 'panel_type': 4, 'psf': 1.84, 'seismic_anchors': 0, 'subarray': 8, 'wind_anchors': 1, 'wind_zones': 'H'}, 'height': 1, 'width': 1, 'x': 0.0, 'y': 0.0},
{'data': {'ballast': 0, 'cross_trays': 0, 'link_trays': 0, 'panel_id': 13, 'panel_type': 4, 'psf': 1.84, 'seismic_anchors': 0, 'subarray': 8, 'wind_anchors': 1, 'wind_zones': 'H'}, 'height': 1, 'width': 1, 'x': 0.0, 'y': 0.0},
{'data': {'ballast': 0, 'cross_trays': 0, 'link_trays': 0, 'panel_id': 14, 'panel_type': 4, 'psf': 1.84, 'seismic_anchors': 0, 'subarray': 8, 'wind_anchors': 1, 'wind_zones': 'H'}, 'height': 1, 'width': 1, 'x': 0.0, 'y': 0.0},
{'data': {'ballast': 0, 'cross_trays': 0, 'link_trays': 0, 'panel_id': 15, 'panel_type': 4, 'psf': 1.84, 'seismic_anchors': 0, 'subarray': 8, 'wind_anchors': 1, 'wind_zones': 'H'}, 'height': 1, 'width': 1, 'x': 0.0, 'y': 0.0},
{'data': {'ballast': 0, 'cross_trays': 0, 'link_trays': 0, 'panel_id': 16, 'panel_type': 4, 'psf': 1.84, 'seismic_anchors': 0, 'subarray': 8, 'wind_anchors': 1, 'wind_zones': 'H'}, 'height': 1, 'width': 1, 'x': 0.0, 'y': 0.0},
{'data': {'ballast': 0, 'cross_trays': 0, 'link_trays': 0, 'panel_id': 17, 'panel_type': 4, 'psf': 1.84, 'seismic_anchors': 0, 'subarray': 8, 'wind_anchors': 1, 'wind_zones': 'H'}, 'height': 1, 'width': 1, 'x': 0.0, 'y': 0.0},
{'data': {'ballast': 0, 'cross_trays': 0, 'link_trays': 0, 'panel_id': 18, 'panel_type': 2, 'psf': 1.84, 'seismic_anchors': 0, 'subarray': 8, 'wind_anchors': 1, 'wind_zones': 'H'}, 'height': 1, 'width': 1, 'x': 0.0, 'y': 0.0},
{'data': {'ballast': 0, 'cross_trays': 0, 'link_trays': 0, 'panel_id': 19, 'panel_type': 2, 'psf': 1.84, 'seismic_anchors': 0, 'subarray': 8, 'wind_anchors': 1, 'wind_zones': 'I'}, 'height': 1, 'width': 1, 'x': 0.0, 'y': 0.0},
],
"subarray_data": [
{"subarray": 8, "weight": 972, "required_seismic_anchors": 0},
{"subarray": 8, "weight": 932, "required_seismic_anchors": 0},
],
}
received_result = flask.json.loads(result.data)
@@ -367,9 +367,10 @@ class ArraySummaryTest(unittest.TestCase):
expected_result = [
{"subarray": 7, "weight": 2253, "required_seismic_anchors": 4},
{"subarray": 8, "weight": 673, "required_seismic_anchors": 0},
{"subarray": 8, "weight": 674, "required_seismic_anchors": 0},
]
received_result = flask.json.loads(result.data)
eq_(received_result['subarray_data'], expected_result)
eq_(result.content_type, "application/json")
@@ -410,7 +411,7 @@ class ArraySummaryTest(unittest.TestCase):
"error": SeismicAnchorValidationError.TooFewAnchors.value,
"panel_data": None,
"subarray_data": [
{"subarray": 1, "weight": 2739, "required_seismic_anchors": 6},
{"subarray": 1, "weight": 2722, "required_seismic_anchors": 6},
],
}
eq_(flask.json.loads(result.data), expected_result)