Beispiel #1
0
 def test_no_name(self):
     self.assertEqual(parse_hash_path('foo#'), {
         'type': 'file',
         'path': 'foo',
         'name': None
     })
     self.assertEqual(parse_hash_path('foo#/'), {
         'type': 'archive',
         'path': 'foo',
         'name': None
     })
Beispiel #2
0
 def test_basic(self):
     self.assertEqual(
         parse_hash_path('foo#bar'),
         {'type': 'file', 'path': 'foo', 'name': 'bar'})
     self.assertEqual(
         parse_hash_path('/dir/foo#bar'),
         {'type': 'file', 'path': '/dir/foo', 'name': 'bar'})
     self.assertEqual(
         parse_hash_path('foo#bar/'),
         {'type': 'archive', 'path': 'foo', 'name': 'bar'})
     self.assertEqual(
         parse_hash_path('/dir/foo#bar/'),
         {'type': 'archive', 'path': '/dir/foo', 'name': 'bar'})
Beispiel #3
0
 def test_basic(self):
     self.assertEqual(parse_hash_path('foo#bar'), {
         'type': 'file',
         'path': 'foo',
         'name': 'bar'
     })
     self.assertEqual(parse_hash_path('/dir/foo#bar'), {
         'type': 'file',
         'path': '/dir/foo',
         'name': 'bar'
     })
     self.assertEqual(parse_hash_path('foo#bar/'), {
         'type': 'archive',
         'path': 'foo',
         'name': 'bar'
     })
     self.assertEqual(parse_hash_path('/dir/foo#bar/'), {
         'type': 'archive',
         'path': '/dir/foo',
         'name': 'bar'
     })
Beispiel #4
0
 def test_no_name(self):
     self.assertEqual(parse_hash_path('foo#'),
                      {'type': 'file', 'path': 'foo', 'name': None})
     self.assertEqual(parse_hash_path('foo#/'),
                      {'type': 'archive', 'path': 'foo', 'name': None})