File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -517,7 +517,7 @@ build_list: BuildListResponse = art.builds.list()
517517# ### Get a list of build runs
518518
519519```python
520- build_runs: BuildRun = art.builds.get_build_runs(" <build_name>" )
520+ build_runs: BuildRuns = art.builds.get_build_runs(" <build_name>" )
521521```
522522
523523# ### Get the information about a build
Original file line number Diff line number Diff line change 2828 BuildPromotionRequest ,
2929 BuildPromotionResult ,
3030 BuildProperties ,
31- BuildRun ,
31+ BuildRuns ,
3232 Run ,
3333 SimpleBuild ,
3434)
9292 "SimpleBuild" ,
9393 "BuildListResponse" ,
9494 "Run" ,
95- "BuildRun " ,
95+ "BuildRuns " ,
9696 "BuildArtifact" ,
9797 "BuildModules" ,
9898 "BuildAgent" ,
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ class Run(BaseModel):
4444 started : str
4545
4646
47- class BuildRun (BaseModel ):
47+ class BuildRuns (BaseModel ):
4848 """Models artifactory build runs."""
4949
5050 uri : str
Original file line number Diff line number Diff line change 1717 BuildPromotionRequest ,
1818 BuildPromotionResult ,
1919 BuildProperties ,
20- BuildRun ,
20+ BuildRuns ,
2121)
2222from pyartifactory .objects .object import ArtifactoryObject
2323
@@ -29,11 +29,11 @@ class ArtifactoryBuild(ArtifactoryObject):
2929
3030 _uri = "build"
3131
32- def get_build_runs (self , build_name : str ) -> BuildRun :
32+ def get_build_runs (self , build_name : str ) -> BuildRuns :
3333 """Provides information about the build runs for the given build name.
3434
3535 :param build_name: Build name to be retrieved
36- :return: BuildRun model object containing server response
36+ :return: BuildRuns model object containing server response
3737 """
3838 try :
3939 response = self ._get (
@@ -44,7 +44,7 @@ def get_build_runs(self, build_name: str) -> BuildRun:
4444 except requests .exceptions .HTTPError as error :
4545 self ._raise_exception (error )
4646
47- return BuildRun (** response .json ())
47+ return BuildRuns (** response .json ())
4848
4949 def get_build_info (
5050 self ,
Original file line number Diff line number Diff line change 1818 BuildPromotionRequest ,
1919 BuildPromotionResult ,
2020 BuildProperties ,
21- BuildRun ,
21+ BuildRuns ,
2222 Run ,
2323)
2424
2525URL = "http://localhost:8080/artifactory"
2626AUTH = ("user" , "password_or_apiKey" )
2727
28- BUILD_RUNS = BuildRun (
28+ BUILD_RUNS = BuildRuns (
2929 uri = f"{ URL } /api/build/build_name" ,
3030 buildsNumbers = [
3131 Run (uri = "/number" , started = "2025-09-05T19:55:09.593+0000" ),
@@ -66,7 +66,7 @@ def test_get_build_numbers_success(mocker):
6666 mocker .spy (artifactory_build , "get_build_runs" )
6767 get_build_runs = artifactory_build .get_build_runs ("build_name" )
6868
69- assert isinstance (get_build_runs , BuildRun )
69+ assert isinstance (get_build_runs , BuildRuns )
7070 assert get_build_runs == BUILD_RUNS
7171
7272
You can’t perform that action at this time.
0 commit comments