Added minimal tests

parent b97397a5
...@@ -167,6 +167,21 @@ class TestWantzel(unittest.TestCase): ...@@ -167,6 +167,21 @@ class TestWantzel(unittest.TestCase):
"test: note 1 / publié (https://laquadrature.net/node/%s)" % i "test: note 1 / publié (https://laquadrature.net/node/%s)" % i
) )
def testFlagCommandForAnUnknownArticle(self):
self.wantzel.on_privmsg("test!test.me", "#test_channel", "~flag http://test.me/article p")
self.wantzel.send_message.assert_called_with(
"#test_channel",
messages["status_unknown_article"] % "test"
)
def testFlagCommandForAKnownArticle(self):
self.wantzel.on_privmsg("test!test.me", "#test_channel", "~rp http://test.me/article")
self.wantzel.on_privmsg("test!test.me", "#test_channel", "~flag http://test.me/article a")
self.wantzel.send_message.assert_called_with(
"test",
"test: note 1 / archivé / non publié"
)
def testStatsCommandWithNoArticle(self): def testStatsCommandWithNoArticle(self):
self.wantzel.on_privmsg("test!test.me", "#test_channel", "~stats") self.wantzel.on_privmsg("test!test.me", "#test_channel", "~stats")
self.wantzel.send_message.assert_called_with( self.wantzel.send_message.assert_called_with(
......
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