You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
607 B
33 lines
607 B
from django.test import TestCase
|
|
|
|
from djangoblog.utils import *
|
|
|
|
|
|
class DjangoBlogTest(TestCase):
|
|
def setUp(self):
|
|
pass
|
|
|
|
def test_utils(self):
|
|
md5 = get_sha256('test')
|
|
self.assertIsNotNone(md5)
|
|
c = CommonMarkdown.get_markdown('''
|
|
# Title1
|
|
|
|
```python
|
|
import os
|
|
```
|
|
|
|
[url](https://www.lylinux.net/)
|
|
|
|
[ddd](http://www.baidu.com)
|
|
|
|
|
|
''')
|
|
self.assertIsNotNone(c)
|
|
d = {
|
|
'd': 'key1',
|
|
'd2': 'key2'
|
|
}
|
|
data = parse_dict_to_url(d)
|
|
self.assertIsNotNone(data)
|