| 1 |
from ocpp.v201.enums import ConnectorEnumType, DataEnumType, TxStartStopPointEnumType |
| 2 |
|
| 3 |
|
| 4 |
def test_connector_type(): |
| 5 |
assert ConnectorEnumType.c_ccs1 == "cCCS1" |
| 6 |
assert ConnectorEnumType.c_ccs2 == "cCCS2" |
| 7 |
assert ConnectorEnumType.c_chao_ji == "cChaoJi" |
| 8 |
assert ConnectorEnumType.c_g105 == "cG105" |
| 9 |
assert ConnectorEnumType.c_gbt == "cGBT" |
| 10 |
assert ConnectorEnumType.c_tesla == "cTesla" |
| 11 |
assert ConnectorEnumType.c_type1 == "cType1" |
| 12 |
assert ConnectorEnumType.c_type2 == "cType2" |
| 13 |
assert ConnectorEnumType.s309_1p_16a == "s309-1P-16A" |
| 14 |
assert ConnectorEnumType.s309_1p_32a == "s309-1P-32A" |
| 15 |
assert ConnectorEnumType.s309_3p_16a == "s309-3P-16A" |
| 16 |
assert ConnectorEnumType.s309_3p_32a == "s309-3P-32A" |
| 17 |
assert ConnectorEnumType.s_bs1361 == "sBS1361" |
| 18 |
assert ConnectorEnumType.s_cee_7_7 == "sCEE-7-7" |
| 19 |
assert ConnectorEnumType.s_type2 == "sType2" |
| 20 |
assert ConnectorEnumType.s_type3 == "sType3" |
| 21 |
assert ConnectorEnumType.opp_charge == "OppCharge" |
| 22 |
assert ConnectorEnumType.other_1ph_max_16a == "Other1PhMax16A" |
| 23 |
assert ConnectorEnumType.other_1ph_over_16a == "Other1PhOver16A" |
| 24 |
assert ConnectorEnumType.other_3ph == "Other3Ph" |
| 25 |
assert ConnectorEnumType.pan == "Pan" |
| 26 |
assert ConnectorEnumType.w_inductive == "wInductive" |
| 27 |
assert ConnectorEnumType.w_resonant == "wResonant" |
| 28 |
assert ConnectorEnumType.undetermined == "Undetermined" |
| 29 |
assert ConnectorEnumType.unknown == "Unknown" |
| 30 |
|
| 31 |
|
| 32 |
def test_data_type(): |
| 33 |
assert DataEnumType.string == "string" |
| 34 |
assert DataEnumType.decimal == "decimal" |
| 35 |
assert DataEnumType.integer == "integer" |
| 36 |
assert DataEnumType.date_time == "dateTime" |
| 37 |
assert DataEnumType.boolean == "boolean" |
| 38 |
assert DataEnumType.option_list == "OptionList" |
| 39 |
assert DataEnumType.sequence_list == "SequenceList" |
| 40 |
assert DataEnumType.member_list == "MemberList" |
| 41 |
assert DataEnumType.password_string == "passwordString" |
| 42 |
|
| 43 |
|
| 44 |
def test_tx_start_stop_point(): |
| 45 |
assert TxStartStopPointEnumType.authorized == "Authorized" |
| 46 |
assert TxStartStopPointEnumType.data_signed == "DataSigned" |
| 47 |
assert TxStartStopPointEnumType.energy_transfer == "EnergyTransfer" |
| 48 |
assert TxStartStopPointEnumType.ev_connected == "EVConnected" |
| 49 |
assert TxStartStopPointEnumType.parking_bay_occupancy == "ParkingBayOccupancy" |
| 50 |
assert TxStartStopPointEnumType.power_path_closed == "PowerPathClosed" |