def test_verify_section_config_case1(self):

    """All the sections don't have configuration file.
    """
    with self.assertRaises(SystemExit) as cm:
      verify_section_config(self.dirpath, self.sections, self.video_src)
    self.assertEqual(cm.exception.code, 1)
Ejemplo n.º 2
0
    def test_verify_section_config_case2(self):
        """Some sections have configuration file, some don't have.
    """
        open(join(self.dirpath, "docs", "section_config.yaml"), "w")
        open(join(self.dirpath, "sdk", "section_config.yaml"), "w")

        with self.assertRaises(SystemExit) as cm:
            verify_section_config(self.dirpath, self.sections, self.video_src)
        self.assertEqual(cm.exception.code, 1)
  def test_verify_section_config_case2(self):

    """Some sections have configuration file, some don't have.
    """
    open(join(self.dirpath, "docs", "section_config.yaml"), "w")
    open(join(self.dirpath, "sdk", "section_config.yaml"), "w")

    with self.assertRaises(SystemExit) as cm:
      verify_section_config(self.dirpath, self.sections, self.video_src)
    self.assertEqual(cm.exception.code, 1)
  def test_verify_section_config_case3(self):
    """All the sections have configuration file.
    """
    open(join(self.dirpath, "docs", "section_config.yaml"), "w")
    open(join(self.dirpath, "sdk", "section_config.yaml"), "w")
    open(join(self.dirpath, "tutorial", "section_config.yaml"), "w")

    try:
      verify_section_config(self.dirpath, self.sections, self.video_src)
    except:
      self.assertTrue(False)
Ejemplo n.º 5
0
    def test_verify_section_config_case3(self):
        """All the sections have configuration file.
    """
        open(join(self.dirpath, "docs", "section_config.yaml"), "w")
        open(join(self.dirpath, "sdk", "section_config.yaml"), "w")
        open(join(self.dirpath, "tutorial", "section_config.yaml"), "w")

        try:
            verify_section_config(self.dirpath, self.sections, self.video_src)
        except:
            self.assertTrue(False)
Ejemplo n.º 6
0
 def test_verify_section_config_case1(self):
     """All the sections don't have configuration file.
 """
     with self.assertRaises(SystemExit) as cm:
         verify_section_config(self.dirpath, self.sections, self.video_src)
     self.assertEqual(cm.exception.code, 1)