Mercurial > public > sg101
diff core/tests/test_ssl_images.py @ 871:6900040df0f8
More WIP on ssl_images command & unit test.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 16 Dec 2014 20:59:49 -0600 |
parents | ee56c8c8cf98 |
children | 1bd9dadcd4d9 |
line wrap: on
line diff
--- a/core/tests/test_ssl_images.py Mon Dec 15 21:16:47 2014 -0600 +++ b/core/tests/test_ssl_images.py Tue Dec 16 20:59:49 2014 -0600 @@ -29,5 +29,87 @@ self.assertNotEqual(test_str, expected) self.assertEqual(expected, result) + def test_sg101_with_newlines(self): + test_str = """An image:  + with trailing text.""" + expected = """An image:  + with trailing text.""" + result = process_post(test_str) + self.assertNotEqual(test_str, expected) + self.assertEqual(expected, result) + def test_https_already(self): - pass + test_str = """An image that is already using https: +  + It's cool. + """ + result = process_post(test_str) + self.assertEqual(test_str, result) + + def test_https_sg101(self): + test_str = """An image that is already using https: +  + It's cool. + """ + expected = """An image that is already using https: +  + It's cool. + """ + result = process_post(test_str) + self.assertEqual(expected, result) + + def test_multiple_non_http(self): + test_str = """An image:  + And another: . + More stuff here.""" + expected = """An image:  + And another: . + More stuff here.""" + result = process_post(test_str) + self.assertEqual(expected, result) + + def test_https_already_with_title(self): + test_str = """An image that is already using https: +  + It's cool. + """ + result = process_post(test_str) + self.assertEqual(test_str, result) + + def test_sg101_with_title(self): + test_str = """An image on SG101: +  + It's cool. + """ + expected = """An image on SG101: +  + It's cool. + """ + result = process_post(test_str) + self.assertEqual(expected, result) + + def test_https_sg101_brackets(self): + test_str = """An image that is already using https: +  + It's cool. + """ + expected = """An image that is already using https: +  + It's cool. + """ + result = process_post(test_str) + self.assertEqual(expected, result) + + def test_https_already_brackets(self): + test_str = """An image that is already using https: +  + It's cool. + """ + expected = """An image that is already using https: +  + It's cool. + """ + result = process_post(test_str) + self.assertEqual(expected, result)