merge with upstream master
This commit is contained in:
@@ -118,7 +118,7 @@ class EbomCalculatorTest(unittest.TestCase):
|
||||
wire_clip_large: 2907,
|
||||
cable_support_lid: 368,
|
||||
cable_support: 368,
|
||||
rear_skirt: -140,
|
||||
rear_skirt_1_1: -140,
|
||||
dc_switch_bracket: 2,
|
||||
front_legs: 23,
|
||||
back_legs: 23,
|
||||
@@ -193,10 +193,10 @@ class EbomCalculatorTest(unittest.TestCase):
|
||||
self.user_values.module_type.return_value = ModuleType.Cell96
|
||||
expected_output = {
|
||||
stump: 65,
|
||||
wire_clip_large: 513,
|
||||
wire_clip_large: 590,
|
||||
cable_support_lid: 0,
|
||||
cable_support: 0,
|
||||
rear_skirt: 0,
|
||||
rear_skirt_1_1: 0,
|
||||
rubber_foot: 9,
|
||||
delta_inverter_leg: 9,
|
||||
harness_4_string_mf: 4,
|
||||
@@ -228,10 +228,10 @@ class EbomCalculatorTest(unittest.TestCase):
|
||||
self.user_values.module_type.return_value = ModuleType.Cell96
|
||||
expected_output = {
|
||||
stump: 0,
|
||||
wire_clip_large: 171,
|
||||
wire_clip_large: 200,
|
||||
cable_support_lid: 0,
|
||||
cable_support: 0,
|
||||
rear_skirt: 0,
|
||||
rear_skirt_1_1: 0,
|
||||
rubber_foot: 3,
|
||||
delta_inverter_leg: 3,
|
||||
harness_4_string_mf: 2,
|
||||
@@ -380,7 +380,7 @@ class EbomCalculatorTest(unittest.TestCase):
|
||||
wire_clip_large: 2394,
|
||||
cable_support: 270,
|
||||
cable_support_lid: 270,
|
||||
rear_skirt: -103,
|
||||
rear_skirt_1_1: -103,
|
||||
ethernet_plug: 7.2,
|
||||
monitor_power_plug: 1,
|
||||
sunshade_bolt: 12,
|
||||
@@ -492,7 +492,7 @@ class EbomCalculatorTest(unittest.TestCase):
|
||||
wire_clip_large: 2394,
|
||||
cable_support: 270,
|
||||
cable_support_lid: 270,
|
||||
rear_skirt: -103,
|
||||
rear_skirt_1_1: -103,
|
||||
ethernet_plug: 7.2,
|
||||
monitor_power_plug: 1,
|
||||
sunshade_bolt: 12,
|
||||
@@ -604,7 +604,7 @@ class EbomCalculatorTest(unittest.TestCase):
|
||||
wire_clip_large: 2394,
|
||||
cable_support: 270,
|
||||
cable_support_lid: 270,
|
||||
rear_skirt: -103,
|
||||
rear_skirt_1_1: -103,
|
||||
ethernet_plug: 7.2,
|
||||
monitor_power_plug: 1,
|
||||
fuseshade: 14,
|
||||
@@ -624,13 +624,13 @@ 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,
|
||||
cable_support: 0,
|
||||
cable_support_lid: 0,
|
||||
rear_skirt: 0,
|
||||
rear_skirt_1_1: 0,
|
||||
monitor_controller_480_v:1,
|
||||
}
|
||||
|
||||
@@ -644,13 +644,13 @@ 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,
|
||||
cable_support: 0,
|
||||
cable_support_lid: 0,
|
||||
rear_skirt: 0,
|
||||
rear_skirt_1_1: 0,
|
||||
monitor_controller_480_v:1,
|
||||
flat_washer: 4,
|
||||
channel_nut: 4,
|
||||
@@ -771,7 +771,7 @@ class EbomCalculatorTest(unittest.TestCase):
|
||||
wire_clip_large: 2394,
|
||||
cable_support: 694,
|
||||
cable_support_lid: 694,
|
||||
rear_skirt: -264,
|
||||
rear_skirt_1_1: -264,
|
||||
ethernet_plug: 7.2,
|
||||
monitor_power_plug: 1,
|
||||
fuseshade: 14,
|
||||
@@ -922,7 +922,7 @@ class EbomCalculatorTest(unittest.TestCase):
|
||||
wire_clip_large: 2394,
|
||||
cable_support: 270,
|
||||
cable_support_lid: 270,
|
||||
rear_skirt: -103,
|
||||
rear_skirt_1_1: -103,
|
||||
ethernet_plug: 7.2,
|
||||
monitor_power_plug: 1,
|
||||
sunshade_bolt: 12,
|
||||
@@ -968,7 +968,7 @@ class EbomCalculatorTest(unittest.TestCase):
|
||||
wire_clip_large: 2394,
|
||||
cable_support: 270,
|
||||
cable_support_lid: 270,
|
||||
rear_skirt: -103,
|
||||
rear_skirt_1_1: -103,
|
||||
ethernet_plug: 7.2,
|
||||
sunshade_bolt: 12,
|
||||
sunshade_washer: 12,
|
||||
@@ -1027,7 +1027,7 @@ class EbomCalculatorTest(unittest.TestCase):
|
||||
mounting_back_plate: 1,
|
||||
cable_support: 0,
|
||||
cable_support_lid: 0,
|
||||
rear_skirt: 0,
|
||||
rear_skirt_1_1: 0,
|
||||
monitor_power_plug: 1,
|
||||
}
|
||||
|
||||
@@ -1046,7 +1046,7 @@ class EbomCalculatorTest(unittest.TestCase):
|
||||
mounting_back_plate: 1,
|
||||
cable_support: 0,
|
||||
cable_support_lid: 0,
|
||||
rear_skirt: 0,
|
||||
rear_skirt_1_1: 0,
|
||||
monitor_power_plug: 1,
|
||||
}
|
||||
|
||||
@@ -1055,14 +1055,14 @@ class EbomCalculatorTest(unittest.TestCase):
|
||||
stump: 0,
|
||||
cable_support: 0,
|
||||
cable_support_lid: 0,
|
||||
rear_skirt: 0
|
||||
rear_skirt_1_1: 0
|
||||
}
|
||||
|
||||
expected_output_240_pseries = {
|
||||
stump: 0,
|
||||
cable_support_lid: 0,
|
||||
cable_support: 0,
|
||||
rear_skirt: 0,
|
||||
rear_skirt_1_1: 0,
|
||||
monitor_controller_240_v: 1,
|
||||
}
|
||||
|
||||
@@ -1116,14 +1116,14 @@ class EbomCalculatorTest(unittest.TestCase):
|
||||
stump: 0,
|
||||
cable_support: 0,
|
||||
cable_support_lid: 0,
|
||||
rear_skirt: 0,
|
||||
rear_skirt_1_1: 0,
|
||||
monitor_controller_480_v: 1,
|
||||
ethernet_plug: 2,
|
||||
}
|
||||
|
||||
assert_dictionary_equal(self.subject.compute_ebom(), expected_output)
|
||||
|
||||
def test_computes_ebom_with_power_monitor_SMA_brand(self):
|
||||
def test_computes_ebom_with_power_monitor_SMA_brand(self):
|
||||
self.user_values.inverter_brands.return_value = [{'inverter_brand_id':1}]
|
||||
self.user_values.power_monitors.return_value = [{
|
||||
'monitor_id': 'foo',
|
||||
@@ -1131,13 +1131,13 @@ 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,
|
||||
cable_support: 0,
|
||||
cable_support_lid: 0,
|
||||
rear_skirt: 0,
|
||||
rear_skirt_1_1: 0,
|
||||
monitor_controller_480_v:1,
|
||||
flat_washer: 4,
|
||||
channel_nut: 4,
|
||||
@@ -1152,7 +1152,3 @@ class EbomCalculatorTest(unittest.TestCase):
|
||||
}
|
||||
|
||||
assert_dictionary_equal(self.subject.compute_ebom(), expected_output)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user