Commit 272458d0 authored by Mindiell's avatar Mindiell

Merge branch 'fix/tests' into 'master'

Fixed tests

See merge request la-quadrature-du-net/rpteam/wantzel!4
parents 7385519f 6bf0423d
...@@ -68,7 +68,7 @@ class TestWantzel(unittest.TestCase): ...@@ -68,7 +68,7 @@ class TestWantzel(unittest.TestCase):
self.wantzel.on_privmsg("test!test.me", "#test_channel", "~rp http://test.me/article") self.wantzel.on_privmsg("test!test.me", "#test_channel", "~rp http://test.me/article")
self.wantzel.send_message.assert_called_once_with( self.wantzel.send_message.assert_called_once_with(
"#test_channel", "#test_channel",
messages["rp_new_article"] % "test" messages["master_rp_new_article"] % "test"
) )
cursor = get_cursor() cursor = get_cursor()
cursor.execute("SELECT COUNT(*) FROM presse") cursor.execute("SELECT COUNT(*) FROM presse")
...@@ -86,7 +86,7 @@ class TestWantzel(unittest.TestCase): ...@@ -86,7 +86,7 @@ class TestWantzel(unittest.TestCase):
self.wantzel.on_privmsg("test!test.me", "#test_channel", "~rp http://test.me/article") self.wantzel.on_privmsg("test!test.me", "#test_channel", "~rp http://test.me/article")
self.wantzel.send_message.assert_called_with( self.wantzel.send_message.assert_called_with(
"#test_channel", "#test_channel",
messages["rp_known_article"] % "test" messages["master_rp_known_article"] % "test"
) )
cursor.execute("SELECT COUNT(*) FROM presse") cursor.execute("SELECT COUNT(*) FROM presse")
rows = cursor.fetchall() rows = cursor.fetchall()
...@@ -103,7 +103,7 @@ class TestWantzel(unittest.TestCase): ...@@ -103,7 +103,7 @@ class TestWantzel(unittest.TestCase):
self.wantzel.on_privmsg("test!test.me", "#test_channel", "~rp http://test.me/article") self.wantzel.on_privmsg("test!test.me", "#test_channel", "~rp http://test.me/article")
self.wantzel.send_message.assert_called_with( self.wantzel.send_message.assert_called_with(
"#test_channel", "#test_channel",
messages["rp_known_article"] % "test" messages["master_rp_known_article"] % "test"
) )
cursor.execute("SELECT COUNT(*) FROM presse") cursor.execute("SELECT COUNT(*) FROM presse")
rows = cursor.fetchall() rows = cursor.fetchall()
...@@ -121,7 +121,7 @@ class TestWantzel(unittest.TestCase): ...@@ -121,7 +121,7 @@ class TestWantzel(unittest.TestCase):
self.wantzel.on_privmsg("test!test.me", "#test_channel", "~rp http://test.me/article") self.wantzel.on_privmsg("test!test.me", "#test_channel", "~rp http://test.me/article")
self.wantzel.send_message.assert_called_with( self.wantzel.send_message.assert_called_with(
"#test_channel", "#test_channel",
messages["rp_taken_article"] % "test" messages["master_rp_taken_article"] % "test"
) )
self.wantzel.irc.client.topic.assert_called_once_with("#lqdn-rp", messages["topic"] % 1) self.wantzel.irc.client.topic.assert_called_once_with("#lqdn-rp", messages["topic"] % 1)
cursor.execute("SELECT COUNT(*) FROM presse") cursor.execute("SELECT COUNT(*) FROM presse")
...@@ -307,7 +307,7 @@ class TestWantzel(unittest.TestCase): ...@@ -307,7 +307,7 @@ class TestWantzel(unittest.TestCase):
self.wantzel.on_privmsg("test!test.me", "#test_channel", "~rp http://test.me/article") self.wantzel.on_privmsg("test!test.me", "#test_channel", "~rp http://test.me/article")
self.wantzel.send_message.assert_called_with( self.wantzel.send_message.assert_called_with(
"#test_channel", "#test_channel",
messages["rp_taken_article"] % "test" messages["master_rp_taken_article"] % "test"
) )
self.wantzel.irc.client.topic.assert_called_once_with("#lqdn-rp", messages["topic"] % 1) self.wantzel.irc.client.topic.assert_called_once_with("#lqdn-rp", messages["topic"] % 1)
cursor.execute("SELECT COUNT(*) FROM presse") cursor.execute("SELECT COUNT(*) FROM presse")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment