-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmock.specs.py
28 lines (19 loc) · 859 Bytes
/
mock.specs.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import unittest
import markdown2
class MockTestCase(unittest.TestCase):
def test_module_is_reacting_as_the_legacy_module_with_kwargs(self):
# given
text = "Hello [World](https://google.com)"
# when
test_object = markdown2.markdown(text, extras=['replace_email_by_button', 'replace_link_by_button'])
# then
self.assertEqual(test_object, """<p>Hello <button class="email_replacement">Jetzt bewerben</button></p>\n""")
def test_module_is_reacting_as_the_legacy_module_with_no_args(self):
# given
text = "Hello [World](https://google.com)"
# when
test_object = markdown2.markdown(text)
# then
self.assertEqual(test_object, """<p>Hello <button class="email_replacement">Jetzt bewerben</button></p>\n""")
if __name__ == '__main__':
unittest.main()