Ejemplo n.º 1
0
 def test_uuid_is_not_found(self):
     with pytest.raises(exceptions.SuffixParsingError):
         trigger.parse_osd_uuid('ljahsdfaslkjhdfa')
Ejemplo n.º 2
0
 def test_uuid_is_not_found_missing_id(self):
     with pytest.raises(exceptions.SuffixParsingError):
         trigger.parse_osd_uuid('ljahs-dfa-slkjhdfa-foo')
Ejemplo n.º 3
0
 def test_uuid_is_parsed(self):
     result = trigger.parse_osd_uuid('1-asdf-ljkh-asdf-ljkh-asdf')
     assert result == 'asdf-ljkh-asdf-ljkh-asdf'
Ejemplo n.º 4
0
 def test_uuid_is_parsed_longer_sha1(self):
     result = trigger.parse_osd_uuid('1-foo-bar-asdf-ljkh-asdf-ljkh-asdf')
     assert result == 'foo-bar-asdf-ljkh-asdf-ljkh-asdf'
Ejemplo n.º 5
0
 def test_uuid_is_not_found_missing_id(self):
     with pytest.raises(exceptions.SuffixParsingError):
         trigger.parse_osd_uuid('ljahs-dfa-slkjhdfa-foo')
Ejemplo n.º 6
0
 def test_uuid_is_not_found(self):
     with pytest.raises(exceptions.SuffixParsingError):
         trigger.parse_osd_uuid('ljahsdfaslkjhdfa')
Ejemplo n.º 7
0
 def test_uuid_is_parsed_longer_sha1(self):
     result = trigger.parse_osd_uuid('1-foo-bar-asdf-ljkh-asdf-ljkh-asdf')
     assert result == 'foo-bar-asdf-ljkh-asdf-ljkh-asdf'
Ejemplo n.º 8
0
 def test_uuid_is_parsed(self):
     result = trigger.parse_osd_uuid('1-asdf-ljkh-asdf-ljkh-asdf')
     assert result == 'asdf-ljkh-asdf-ljkh-asdf'
 def test_robust_double_id_in_uuid(self):
     # it is possible to have the id in the SHA1, this should
     # be fine parsing that
     result = trigger.parse_osd_uuid("1-abc959fd-1ec9-4864-b141-3154f9b9f8ed")
     assert result == 'abc959fd-1ec9-4864-b141-3154f9b9f8ed'