1. Erik Dalén
  2. irc


Jason R. Coombs  committed 4beda51

Repaired failing test

  • Participants
  • Parent commits 4f85058
  • Branches default

Comments (0)

Files changed (1)

File irc/tests/test_client.py

View file
 def test_privmsg_sends_msg(socket_mod):
-	pytest.xfail("Fails because server finds 'write' method on mock socket")
 	server = irc.client.IRC().server()
 	server.connect('foo', 6667, 'bestnick')
+	# make sure the mock object doesn't have a write method or it will treat
+	#  it as an SSL connection and never call .send.
+	del server.socket.write
 	server.privmsg('#best-channel', 'You are great')
-	socket_mod.socket.return_value.send.assert_called_with(
+	server.socket.send.assert_called_with(
 		b'PRIVMSG #best-channel :You are great\r\n')