--- /dev/null
+<list>
+ <stagingActivity>
+ <name>open</name>
+ <started>2021-01-01T01:01:00.000Z</started>
+ <stopped>2021-01-01T01:01:01.000Z</stopped>
+ <events>
+ <stagingActivityEvent>
+ <timestamp>2021-01-01T01:01:01.000Z</timestamp>
+ <name>repositoryCreated</name>
+ <severity>0</severity>
+ <properties>
+ <stagingProperty>
+ <name>id</name>
+ <value>test-release-repo</value>
+ </stagingProperty>
+ </properties>
+ </stagingActivityEvent>
+ </events>
+ </stagingActivity>
+ <stagingActivity>
+ <name>close</name>
+ <started>2021-01-01T01:01:02.000Z</started>
+ <stopped>2021-01-01T01:01:03.000Z</stopped>
+ <events>
+ <stagingActivityEvent>
+ <timestamp>2021-01-01T01:01:02.000Z</timestamp>
+ <name>repositoryClosed</name>
+ <severity>0</severity>
+ <properties>
+ <stagingProperty>
+ <name>id</name>
+ <value>test-release-repo</value>
+ </stagingProperty>
+ </properties>
+ </stagingActivityEvent>
+ </events>
+ </stagingActivity>
+ <stagingActivity>
+ <name>release</name>
+ <started>2021-01-01T01:01:04.000Z</started>
+ <events>
+ <stagingActivityEvent>
+ <timestamp>2021-01-01T01:01:04.000Z</timestamp>
+ <name>repositoryReleased</name>
+ <severity>0</severity>
+ <properties>
+ <stagingProperty>
+ <name>id</name>
+ <value>test-release-repo</value>
+ </stagingProperty>
+ </properties>
+ </stagingActivityEvent>
+ </events>
+ </stagingActivity>
+</list>
request_url = "{}/staging/bulk/promote".format(baseurl)
closed_return = open("staging_activities_closed.xml", "r").read()
+ releasing_return = open("staging_activities_releasing.xml", "r").read()
released_return = open("staging_activities_released.xml", "r").read()
responses.add(responses.GET, activity_url, closed_return, status=200)
responses.add(responses.POST, request_url, status=201)
# While checking for the "release" activity, we return once without it in
# order to exercise the code for "if not released".
- responses.add(responses.GET, activity_url, closed_return, status=200)
+ responses.add(responses.GET, activity_url, releasing_return, status=200)
responses.add(responses.GET, activity_url, released_return, status=200)
cmd.release_staging_repos(repos, False)