Bez popisu

test_v201_enums.py 2.1KB

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