예제 #1
0
파일: test_std.py 프로젝트: marrow/cinje
	def test_heading_iterator(self, std):
		assert flatten(std.heading(iter(['Wazzit.']), 2)) == '<h2>Wazzit.</h2>\n'
예제 #2
0
파일: test_std.py 프로젝트: marrow/cinje
	def test_link(self, std):
		assert flatten(std.link('http://example.com')) == '<a href="http://example.com"></a>'
예제 #3
0
파일: test_std.py 프로젝트: marrow/cinje
	def test_heading(self, std):
		assert flatten(std.heading('Allo.')) == '<h1>Allo.</h1>\n'
예제 #4
0
파일: test_std.py 프로젝트: marrow/cinje
	def test_span_iterator(self, std):
		assert flatten(std.span(iter(["Yay!"]))) == '<span>Yay!</span>'
예제 #5
0
파일: test_std.py 프로젝트: marrow/cinje
	def test_span_protected(self, std):
		assert flatten(std.span("<malicious>")) == '<span>&lt;malicious&gt;</span>'
예제 #6
0
파일: test_std.py 프로젝트: marrow/cinje
	def test_span(self, std):
		assert flatten(std.span("Hello!")) == '<span>Hello!</span>'
예제 #7
0
파일: test_std.py 프로젝트: marrow/cinje
	def test_div(self, std):
		assert flatten(std.div(foo="bar", data_baz="42")) == '<div data-baz="42" foo="bar">\n</div>\n'
예제 #8
0
파일: test_use.py 프로젝트: marrow/cinje
	def test_kwargs(self, tmpl):
		assert flatten(tmpl(producer, name='foo', occupation='bar')) == '\n{"name": "foo", "occupation": "bar"}'
예제 #9
0
파일: test_use.py 프로젝트: marrow/cinje
	def test_args(self, tmpl):
		assert flatten(tmpl(producer, 'foo', 'bar')) == "foo, bar\n{}"
예제 #10
0
파일: test_use.py 프로젝트: marrow/cinje
	def test_simple(self, tmpl):
		assert flatten(tmpl(producer)) == '\n{}'