File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""Integration tests for FeedsClient."""
22
3+ import random
4+ import string
35import uuid
46from pathlib import Path
57from random import randint
1012from nisystemlink .clients .feeds import FeedsClient
1113from nisystemlink .clients .feeds .models import CreateFeedRequest , Platform
1214
13-
1415FEED_DESCRIPTION = "Sample feed for uploading packages"
1516PACKAGE_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
You can’t perform that action at this time.
0 commit comments