Skip to content

Commit 99162ea

Browse files
committed
fix: feedname with accepted format
1 parent 7bf102b commit 99162ea

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tests/integration/feeds/test_feeds_client.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
"""Integration tests for FeedsClient."""
22

3+
import random
4+
import string
35
import uuid
46
from pathlib import Path
57
from random import randint
68
from typing import BinaryIO, Callable
79

810
import pytest
11+
912
from nisystemlink.clients.core import ApiException
1013
from nisystemlink.clients.feeds import FeedsClient
1114
from nisystemlink.clients.feeds.models import CreateFeedRequest, Platform
1215

13-
1416
FEED_DESCRIPTION = "Sample feed for uploading packages"
1517
PACKAGE_PATH = str(
1618
Path(__file__).parent.resolve()
@@ -76,7 +78,13 @@ def get_feed_name():
7678
"""Generate a feed name."""
7779

7880
def _get_feed_name():
79-
feed_name = uuid.uuid1().hex[:255]
81+
82+
first_char = random.choice(string.ascii_letters)
83+
uuid_part = uuid.uuid4()
84+
allowed_chars = string.ascii_letters + string.digits + " _-"
85+
filtered_uuid = ''.join(char for char in uuid_part if char in allowed_chars)
86+
87+
feed_name = f"{first_char}{filtered_uuid}"
8088
return feed_name
8189

8290
yield _get_feed_name

0 commit comments

Comments
 (0)