Compare commits
4 Commits
rj45-delta
...
scaled-val
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
20a6d7b518 | ||
|
|
49348ce8ca | ||
|
|
93f3bfdc79 | ||
|
|
4f16a398aa |
@@ -91,6 +91,8 @@ class EbomCalculator(object):
|
|||||||
for monitor in monitors:
|
for monitor in monitors:
|
||||||
if monitor['power_source'][0] == 'Switch Gear/External':
|
if monitor['power_source'][0] == 'Switch Gear/External':
|
||||||
add_parts_to_list(part_list, {proper_monitor_controller: 1}, 1)
|
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)
|
add_parts_to_list(part_list, {wire_clip_large: inverter_count}, self.row_count)
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ from helix.models.coordinate import Coordinate
|
|||||||
from helix.models.panel import PanelData, Panel
|
from helix.models.panel import PanelData, Panel
|
||||||
from helix.models.sql.inverter_brands import InverterBrand
|
from helix.models.sql.inverter_brands import InverterBrand
|
||||||
|
|
||||||
|
|
||||||
class UserValues(object):
|
class UserValues(object):
|
||||||
def __init__(self, store, site):
|
def __init__(self, store, site):
|
||||||
self.store = store
|
self.store = store
|
||||||
|
|||||||
@@ -491,6 +491,8 @@ class CalculatorTest(unittest.TestCase):
|
|||||||
|
|
||||||
assert_array_equal(sorted(self.subject.documentation_bom()), sorted(expected))
|
assert_array_equal(sorted(self.subject.documentation_bom()), sorted(expected))
|
||||||
|
|
||||||
|
# Performance Tests
|
||||||
|
|
||||||
def test_performance_with_1000ish_module_site(self):
|
def test_performance_with_1000ish_module_site(self):
|
||||||
store = Store(mockredis.mock_redis_client(), "foo")
|
store = Store(mockredis.mock_redis_client(), "foo")
|
||||||
|
|
||||||
|
|||||||
@@ -1111,7 +1111,6 @@ class EbomCalculatorTest(unittest.TestCase):
|
|||||||
self.user_values.system_type.return_value = SystemType.singleTilt
|
self.user_values.system_type.return_value = SystemType.singleTilt
|
||||||
self.user_values.module_type.return_value = ModuleType.Cell96
|
self.user_values.module_type.return_value = ModuleType.Cell96
|
||||||
|
|
||||||
|
|
||||||
expected_output = {
|
expected_output = {
|
||||||
monitor_power_plug: 1,
|
monitor_power_plug: 1,
|
||||||
stump: 0,
|
stump: 0,
|
||||||
@@ -1119,6 +1118,7 @@ class EbomCalculatorTest(unittest.TestCase):
|
|||||||
cable_support_lid: 0,
|
cable_support_lid: 0,
|
||||||
rear_skirt: 0,
|
rear_skirt: 0,
|
||||||
monitor_controller_480_v: 1,
|
monitor_controller_480_v: 1,
|
||||||
|
ethernet_plug: 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
assert_dictionary_equal(self.subject.compute_ebom(), expected_output)
|
assert_dictionary_equal(self.subject.compute_ebom(), expected_output)
|
||||||
|
|||||||
Reference in New Issue
Block a user