def test__make_random_filename(self):
     """_make_random_filename should return correct result.
     """
     prefix = 'test_prefix'
     suffix = 'test_suffix'
     num_chars = 10
     obs = _make_random_filename(prefix=prefix,suffix=suffix,\
         num_chars=num_chars)
     self.assertEqual(len(obs), sum([len(prefix), len(suffix), num_chars]))
     self.assertEqual(obs[:len(prefix)], prefix)
     self.assertEqual(obs[len(prefix) + num_chars:], suffix)
 def test__make_random_filename(self):
     """_make_random_filename should return correct result.
     """
     prefix = 'test_prefix'
     suffix = 'test_suffix'
     num_chars = 10
     obs = _make_random_filename(prefix=prefix,suffix=suffix,\
         num_chars=num_chars)
     self.assertEqual(len(obs),sum([len(prefix),len(suffix),num_chars]))
     self.assertEqual(obs[:len(prefix)],prefix)
     self.assertEqual(obs[len(prefix)+num_chars:],suffix)
    def test__make_random_filename(self):
        """_make_random_filename should return correct result.
        """
        base_dir = './'
        suffix = 'test_suffix'
        num_chars = 10
        obs = _make_random_filename(base_dir=base_dir,suffix=suffix,\
            num_chars=num_chars)

        self.assertEqual(len(obs),sum([len(base_dir),len(suffix),num_chars]))
        self.assertEqual(obs[:len(base_dir)],base_dir)
        self.assertEqual(obs[len(base_dir)+num_chars:],suffix)
    def test__make_random_filename(self):
        """_make_random_filename should return correct result.
        """
        base_dir = './'
        suffix = 'test_suffix'
        num_chars = 10
        obs = _make_random_filename(base_dir=base_dir,suffix=suffix,\
            num_chars=num_chars)

        self.assertEqual(len(obs), sum([len(base_dir),
                                        len(suffix), num_chars]))
        self.assertEqual(obs[:len(base_dir)], base_dir)
        self.assertEqual(obs[len(base_dir) + num_chars:], suffix)