Exemple #1
0
 def test_1_level_success(self):
     input_str = 'foo'
     num_levels = 1
     expected_hash_subdir = '33'
     hash_subdir = fi._get_hash_subdir(input_str, num_levels)
     self.assertEqual(hash_subdir, expected_hash_subdir)
Exemple #2
0
 def test_zero_subfolder_levels(self):
     input_str = 'foo'
     num_levels = 0
     with self.assertRaises(ValueError):
         fi._get_hash_subdir(input_str, num_levels)
Exemple #3
0
 def test_3_levels_success(self):
     input_str = 'foo'
     num_levels = 3
     expected_hash_subdir = 'da/8a/33'
     hash_subdir = fi._get_hash_subdir(input_str, num_levels)
     self.assertEqual(hash_subdir, expected_hash_subdir)