77
88from . import socketio_client
99from .conftest import setupDrone
10- from .helpers import send_and_recieve
10+ from .helpers import send_and_receive
1111
1212VALID_DRONE_PORT : str
1313
@@ -45,7 +45,7 @@ def get_comport_name(port):
4545def test_getComPort () -> None :
4646 # TODO: we should automate different OS environments for our unit tests maybe?
4747 assert (
48- send_and_recieve ("get_com_ports" )
48+ send_and_receive ("get_com_ports" )
4949 == [
5050 f"{ get_comport_name (port )} : { port .description } "
5151 for port in list_ports .comports ()
@@ -56,28 +56,28 @@ def test_getComPort() -> None:
5656
5757def test_connectToDrone_badType () -> None :
5858 # Failure on bad connection type
59- assert send_and_recieve ("connect_to_drone" , {}) == {
59+ assert send_and_receive ("connect_to_drone" , {}) == {
6060 "message" : "Connection type not specified."
6161 }
62- assert send_and_recieve ("connect_to_drone" , {"connectionType" : "testtype" }) == {
62+ assert send_and_receive ("connect_to_drone" , {"connectionType" : "testtype" }) == {
6363 "message" : "Connection type not specified."
6464 }
6565
6666
6767def test_connectToDrone_badPort () -> None :
6868 # Failure on no port specified
69- assert send_and_recieve ("connect_to_drone" , {"connectionType" : "serial" }) == {
69+ assert send_and_receive ("connect_to_drone" , {"connectionType" : "serial" }) == {
7070 "message" : "COM port not specified."
7171 }
72- assert send_and_recieve ("connect_to_drone" , {"connectionType" : "network" }) == {
72+ assert send_and_receive ("connect_to_drone" , {"connectionType" : "network" }) == {
7373 "message" : "Connection address not specified."
7474 }
7575
7676 # Failure on bad port specified
77- assert send_and_recieve (
77+ assert send_and_receive (
7878 "connect_to_drone" , {"connectionType" : "serial" , "port" : "testport" }
7979 ) == {"message" : "COM port not found." }
80- assert send_and_recieve (
80+ assert send_and_receive (
8181 "connect_to_drone" , {"connectionType" : "serial" , "port" : "COM10:5761" }
8282 ) == {"message" : "COM port not found." }
8383
@@ -139,25 +139,25 @@ def test_connectToDrone_badBaud() -> None:
139139 )
140140
141141 # Failure on invalid baud rate value
142- assert send_and_recieve (
142+ assert send_and_receive (
143143 "connect_to_drone" ,
144144 {"connectionType" : connectionType , "port" : VALID_DRONE_PORT , "baud" : - 1 },
145145 ) == {
146146 "message" : f"{ - 1 } is an invalid baudrate. Valid baud rates are { Drone .getValidBaudrates ()} "
147147 }
148- assert send_and_recieve (
148+ assert send_and_receive (
149149 "connect_to_drone" ,
150150 {"connectionType" : connectionType , "port" : VALID_DRONE_PORT , "baud" : 110 },
151151 ) == {
152152 "message" : f"{ 110 } is an invalid baudrate. Valid baud rates are { Drone .getValidBaudrates ()} "
153153 }
154154
155155 # Failure on invalid baud rate types
156- assert send_and_recieve (
156+ assert send_and_receive (
157157 "connect_to_drone" ,
158158 {"connectionType" : connectionType , "port" : VALID_DRONE_PORT , "baud" : 9600.0 },
159159 ) == {"message" : "Expected integer value for baud, received float." }
160- assert send_and_recieve (
160+ assert send_and_receive (
161161 "connect_to_drone" ,
162162 {"connectionType" : connectionType , "port" : VALID_DRONE_PORT , "baud" : "9600" },
163163 ) == {"message" : "Expected integer value for baud, received str." }
0 commit comments