Exemple #1
0
def test_split_uuid_fifth_piece_too_short():
    with raises(ValueError):
        split_uuid('7575a428-aaf7-4c2e-929e-1e2a0ab59e1')
Exemple #2
0
def test_split_uuid_fourth_piece_too_long():
    with raises(ValueError):
        split_uuid('7575a428-aaf7-4c2e-929ea-1e2a0ab59e16')
Exemple #3
0
def test_split_uuid_third_piece_too_short():
    with raises(ValueError):
        split_uuid('7575a428-aaf7-4c2-929e-1e2a0ab59e16')
Exemple #4
0
def test_split_uuid_too_few_pieces():
    with raises(ValueError):
        split_uuid('7575a428-4c2e-929e-1e2a0ab59e16')
Exemple #5
0
def test_split_uuid_second_piece_too_long():
    with raises(ValueError):
        split_uuid('7575a428-aaf7a-4c2e-929e-1e2a0ab59e16')
Exemple #6
0
def test_split_uuid_valid():
    assert (
        split_uuid('7575a428-aaf7-4c2e-929e-1e2a0ab59e16') ==
        ('7575a428aaf7', '4c2e929e', '1e2a0ab59e16')
    )
Exemple #7
0
def test_split_uuid_too_many_pieces():
    with raises(ValueError):
        split_uuid('aaf7-7575a428-aaf7-4c2e-929e-1e2a0ab59e16')
Exemple #8
0
def test_split_uuid_third_piece_too_short():
    with raises(ValueError):
        split_uuid('7575a428-aaf7-4c2-929e-1e2a0ab59e16')
Exemple #9
0
def test_split_uuid_fifth_piece_too_short():
    with raises(ValueError):
        split_uuid('7575a428-aaf7-4c2e-929e-1e2a0ab59e1')
Exemple #10
0
def test_split_uuid_fourth_piece_too_long():
    with raises(ValueError):
        split_uuid('7575a428-aaf7-4c2e-929ea-1e2a0ab59e16')
Exemple #11
0
def test_split_uuid_second_piece_too_long():
    with raises(ValueError):
        split_uuid('7575a428-aaf7a-4c2e-929e-1e2a0ab59e16')
Exemple #12
0
def test_split_uuid_too_few_pieces():
    with raises(ValueError):
        split_uuid('7575a428-4c2e-929e-1e2a0ab59e16')
Exemple #13
0
def test_split_uuid_too_many_pieces():
    with raises(ValueError):
        split_uuid('aaf7-7575a428-aaf7-4c2e-929e-1e2a0ab59e16')
Exemple #14
0
def test_split_uuid_valid():
    assert (split_uuid('7575a428-aaf7-4c2e-929e-1e2a0ab59e16') == (
        '7575a428aaf7', '4c2e929e', '1e2a0ab59e16'))