@@ -16,6 +16,38 @@ def test_get_status_auth_err(test_charger_auth_err):
1616 assert test_charger_auth_err is None
1717
1818
19+ def test_send_command (test_charger , send_command_mock ):
20+ """Test v4 Status reply"""
21+ status = test_charger .send_command ("test" )
22+ assert status == (True , "test" )
23+
24+
25+ def test_send_command_missing (test_charger , send_command_mock_missing ):
26+ """Test v4 Status reply"""
27+ status = test_charger .send_command ("test" )
28+ assert status == (False , "" )
29+
30+
31+ def test_send_command_auth (test_charger_auth , send_command_mock ):
32+ """Test v4 Status reply"""
33+ status = test_charger_auth .send_command ("test" )
34+ assert status == (True , "test" )
35+
36+
37+ def test_send_command_parse_err (test_charger_auth , send_command_parse_err ):
38+ """Test v4 Status reply"""
39+ with pytest .raises (openevsehttp .ParseJSONError ):
40+ status = test_charger_auth .send_command ("test" )
41+ assert status is None
42+
43+
44+ def test_send_command_auth_err (test_charger_auth , send_command_auth_err ):
45+ """Test v4 Status reply"""
46+ with pytest .raises (openevsehttp .AuthenticationError ):
47+ status = test_charger_auth .send_command ("test" )
48+ assert status is None
49+
50+
1951@pytest .mark .parametrize (
2052 "fixture, expected" ,
2153 [("test_charger" , "sleeping" ), ("test_charger_v2" , "not connected" )],
0 commit comments