forked from douban/code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_html_doc.py
More file actions
56 lines (40 loc) · 1.4 KB
/
test_html_doc.py
File metadata and controls
56 lines (40 loc) · 1.4 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# -*- coding: utf-8 -*-
import os
from vilya.models.doc import HTMLDoc, DocBuilder
from tests.utils import get_temp_project
from tests.base import TestCase
DOC_REPO_PATH = os.path.join(os.path.dirname(__file__),
'../data/doc_repo')
class TestHTMLDoc(TestCase):
def setUp(self):
super(TestCase, self).setUp()
self.project = get_temp_project(repo_path=DOC_REPO_PATH)
project = self.project
self.builder = DocBuilder(project, 'html')
def tearDown(self):
self.project.delete()
super(TestCase, self).tearDown()
def test_exists(self):
doc = HTMLDoc(self.project, 'html', 'codeep-001.html')
self.assertFalse(doc.exists)
doc = HTMLDoc(self.project, 'html', 'codeep-002.html')
self.assertFalse(doc.exists)
self.builder.build()
doc = HTMLDoc(self.project, 'html', 'codeep-001.html')
self.assertTrue(doc.exists)
doc = HTMLDoc(self.project, 'html', 'codeep-002.html')
self.assertFalse(doc.exists)
def test_is_template(self):
self.builder.build()
doc = HTMLDoc(self.project, 'html', 'codeep-001.html')
self.assertIsNone(doc.is_template)
def test_content(self):
pass
def test_content_type(self):
pass
def test_path(self):
pass
def test_doc_path(self):
pass
def teest_doc_id(self):
pass