Example #1
0
 def test_remove_index_noindex(self):
     handle_with_index = "foo/bar"
     syntax_checked = check_handle_syntax(handle_with_index)
     self.assertTrue(syntax_checked, 'Test precondition failed!')
     index, handle = remove_index_from_handle(handle_with_index)
     syntax_checked = check_handle_syntax(handle)
     self.assertTrue(syntax_checked,
         'After removing the index, the syntax of the handle should '+\
         'be prefix/suffix.')
 def test_remove_index_noindex(self):
     handle_with_index = "foo/bar"
     syntax_checked = check_handle_syntax(handle_with_index)
     self.assertTrue(syntax_checked,
         'Test precondition failed!')
     index, handle = remove_index_from_handle(handle_with_index)
     syntax_checked = check_handle_syntax(handle)
     self.assertTrue(syntax_checked,
         'After removing the index, the syntax of the handle should '+\
         'be prefix/suffix.')
 def test_remove_index_toomany(self):
     handle_with_index = "100:100:foo/bar"
     with self.assertRaises(HandleSyntaxError):
         index, handle = remove_index_from_handle(handle_with_index)
Example #4
0
 def test_remove_index_toomany(self):
     handle_with_index = "100:100:foo/bar"
     with self.assertRaises(HandleSyntaxError):
         index, handle = remove_index_from_handle(handle_with_index)