Skip to content

Commit ab28a0c

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

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

tests/integration/feeds/test_feeds_client.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
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
@@ -10,7 +12,6 @@
1012
from nisystemlink.clients.feeds import FeedsClient
1113
from nisystemlink.clients.feeds.models import CreateFeedRequest, Platform
1214

13-
1415
FEED_DESCRIPTION = "Sample feed for uploading packages"
1516
PACKAGE_PATH = str(
1617
Path(__file__).parent.resolve()
@@ -76,7 +77,13 @@ def get_feed_name():
7677
"""Generate a feed name."""
7778

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

8289
yield _get_feed_name

0 commit comments

Comments
 (0)