def TestScriptStructure():
@pytest.fixture(scope="class")
def script():
return Script(js_path="//js")
def test_widget_abstract_script_html_tag(self, script):
assert script.html_tag == 'script', 'Script should set Script.html_tag = "script".'
def test_widget_abstract_script_has_source(self, script):
assert hasattr('source', script) and isinstance(script.__class__.source, property)
def test_widget_abstract_script_sets_source(self, script):
assert script.source == '//js', "Script.build() should set Script.source."
评论列表
文章目录