def test_auth_end_in_incorrect_state(self): conn = Connection(our_role="server") conn._conn.machine.set_state("greeting_request") with self.assertRaises(ProtocolError): conn.auth_end()
def test_auth_end(self): conn = Connection(our_role="server") conn._conn.machine.set_state("auth_inprogress") conn.auth_end() self.assertEqual(conn._conn.state, "request")
def test_auth_end(self): conn = Connection(our_role="client") conn._conn.machine.set_state("auth_inprogress") conn.auth_end() self.assertEqual(conn._conn.state, "request")