예제 #1
0
 def test_sublang(self):
     config = setup_defaults()
     config.set("output", os.path.join(os.path.dirname(os.path.realpath(__file__)), "postprocess/textfile-service"))
     service = Service(config, "http://exmaple.com")
     service.output["title"] = "textfile"
     stream = VideoRetriever(config, "http://example.com", 0, output=service.output)
     assert _sublanguage(stream, config, None) == ["swe"]
예제 #2
0
 def test_sublang3(self, req):
     config = setup_defaults()
     self.setup_mock(req, "smj")
     config.set("output", os.path.join(os.path.dirname(os.path.realpath(__file__)), "postprocess/textfile-service"))
     config.set("get_all_subtitles", True)
     service = Service(config, "http://exmaple.com")
     service.output["title"] = "textfile"
     stream = VideoRetriever(config, "http://example.com", 0, output=service.output)
     self.assertEqual(_sublanguage(stream, config, ["lulesamiska"]), ["smj"])