|
|
@ -5,6 +5,7 @@ import unittest |
|
|
|
import utils.css_tool |
|
|
|
import basic.program |
|
|
|
import test.testtools |
|
|
|
import basic.constants as B |
|
|
|
|
|
|
|
# the list of TEST_FUNCTIONS defines which function will be really tested. |
|
|
|
# if you minimize the list you can check the specific test-function |
|
|
@ -24,8 +25,8 @@ class MyTestCase(unittest.TestCase): |
|
|
|
"modus": "unit"} |
|
|
|
job.par.setParameterArgs(job, args) |
|
|
|
# ------- inline --------------- |
|
|
|
job.conf.setConfig("tools.csstyp", "inline") |
|
|
|
job.conf.confs.get("tools")["csstyp"] == "inline" |
|
|
|
job.conf.setConfig("tool.css.type", "inline") |
|
|
|
job.conf.confs.get(B.SUBJECT_TOOL).get("css").get("typ") == "inline" |
|
|
|
text = utils.css_tool.getInlineStyle(job, "diffFiles", "diffA") |
|
|
|
self.assertEqual(len(text), 37) |
|
|
|
self.assertEqual(("style" in text), True) |
|
|
@ -40,7 +41,7 @@ class MyTestCase(unittest.TestCase): |
|
|
|
text = utils.css_tool.getExternalStyle(job, "diffFiles") |
|
|
|
self.assertEqual(len(text), 0) |
|
|
|
# ------- internal --------------- |
|
|
|
job.conf.setConfig("tools.csstyp", "internal") |
|
|
|
job.conf.setConfig("tool.css.type", "internal") |
|
|
|
text = utils.css_tool.getInlineStyle(job, "diffFiles", "diffA") |
|
|
|
self.assertEqual(len(text), 13) |
|
|
|
self.assertEqual(("class" in text), True) |
|
|
@ -64,7 +65,7 @@ class MyTestCase(unittest.TestCase): |
|
|
|
if verbose: print(text) |
|
|
|
if verbose: print(str(len(text))) |
|
|
|
# ------- external --------------- |
|
|
|
job.conf.setConfig("tools.csstyp", "external") |
|
|
|
job.conf.setConfig("tool.css.type", "external") |
|
|
|
text = utils.css_tool.getInlineStyle(job, "diffFiles", "diffA") |
|
|
|
self.assertEqual(len(text), 13) |
|
|
|
self.assertEqual(("class" in text), True) |
|
|
|