Skip to content

Commit 9a910e4

Browse files
committed
fix: Address PR comments
1 parent 13fc246 commit 9a910e4

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

nisystemlink/clients/feeds/_feeds_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
from nisystemlink.clients import core
66
from nisystemlink.clients.core._uplink._base_client import BaseClient
77
from nisystemlink.clients.core._uplink._methods import delete, get, post
8-
from uplink import Part, Path, Query
8+
from uplink import Part, Path, Query, retry
99

1010
from . import models
1111

1212

13+
@retry(when=retry.when.status(429), stop=retry.stop.after_attempt(5))
1314
class FeedsClient(BaseClient):
1415
def __init__(self, configuration: Optional[core.HttpConfiguration] = None):
1516
"""Initialize an instance.

tests/integration/feeds/test_feeds_client.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
"""Integration tests for FeedsClient."""
22

3-
import random
4-
import string
53
import uuid
64
from pathlib import Path
75
from random import randint
@@ -11,7 +9,6 @@
119
from nisystemlink.clients.core import ApiException
1210
from nisystemlink.clients.feeds import FeedsClient
1311
from nisystemlink.clients.feeds.models import CreateFeedRequest, Platform
14-
from uplink import retry
1512

1613
FEED_DESCRIPTION = "Sample feed for uploading packages"
1714
PACKAGE_PATH = str(
@@ -23,7 +20,6 @@
2320

2421

2522
@pytest.fixture(scope="class")
26-
@retry(when=retry.when.status(429), stop=retry.stop.after_attempt(5))
2723
def client(enterprise_config) -> FeedsClient:
2824
"""Fixture to create a FeedsClient instance."""
2925
return FeedsClient(enterprise_config)
@@ -80,10 +76,8 @@ def get_feed_name():
8076
"""Generate a feed name."""
8177

8278
def _get_feed_name():
83-
84-
first_char = random.choice(string.ascii_letters)
8579
uuid_part = uuid.uuid4().hex
86-
feed_name = f"{PREFIX}{first_char}{uuid_part}"
80+
feed_name = f"{PREFIX}{uuid_part}"
8781

8882
return feed_name
8983

0 commit comments

Comments
 (0)