File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed 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
68from typing import BinaryIO , Callable
79
810import pytest
11+
912from nisystemlink .clients .core import ApiException
1013from nisystemlink .clients .feeds import FeedsClient
1114from nisystemlink .clients .feeds .models import CreateFeedRequest , Platform
1215
13-
1416FEED_DESCRIPTION = "Sample feed for uploading packages"
1517PACKAGE_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
You can’t perform that action at this time.
0 commit comments