4 Commits

Author SHA1 Message Date
GotPPay
20a6d7b518 test fix again 2017-11-28 00:34:58 +01:00
GotPPay
49348ce8ca test fix 2017-11-28 00:34:58 +01:00
GotPPay
93f3bfdc79 scaled version 2017-11-28 00:31:35 +01:00
GotPPay
4f16a398aa . 2017-11-28 00:31:03 +01:00
4 changed files with 5 additions and 2 deletions

View File

@@ -91,6 +91,8 @@ class EbomCalculator(object):
for monitor in monitors:
if monitor['power_source'][0] == 'Switch Gear/External':
add_parts_to_list(part_list, {proper_monitor_controller: 1}, 1)
if (is_delta):
add_parts_to_list(part_list, {ethernet_plug: 2},1)
add_parts_to_list(part_list, {wire_clip_large: inverter_count}, self.row_count)

View File

@@ -10,7 +10,6 @@ from helix.models.coordinate import Coordinate
from helix.models.panel import PanelData, Panel
from helix.models.sql.inverter_brands import InverterBrand
class UserValues(object):
def __init__(self, store, site):
self.store = store

View File

@@ -491,6 +491,8 @@ class CalculatorTest(unittest.TestCase):
assert_array_equal(sorted(self.subject.documentation_bom()), sorted(expected))
# Performance Tests
def test_performance_with_1000ish_module_site(self):
store = Store(mockredis.mock_redis_client(), "foo")

View File

@@ -1111,7 +1111,6 @@ class EbomCalculatorTest(unittest.TestCase):
self.user_values.system_type.return_value = SystemType.singleTilt
self.user_values.module_type.return_value = ModuleType.Cell96
expected_output = {
monitor_power_plug: 1,
stump: 0,
@@ -1119,6 +1118,7 @@ class EbomCalculatorTest(unittest.TestCase):
cable_support_lid: 0,
rear_skirt: 0,
monitor_controller_480_v: 1,
ethernet_plug: 2,
}
assert_dictionary_equal(self.subject.compute_ebom(), expected_output)