mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-07 05:42:42 +00:00
Improvement: Remove Magic Numbers in Tests with Tasks
Replaced 2 with TASK_SUCCEEDED, 3 with TASK_FAILED. fixes: #1158
This commit is contained in:
committed by
Benj Fassbind
parent
5b5307cc15
commit
90932cdac5
@@ -2,7 +2,7 @@ import urllib.error
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
|
||||
from api_lib import APITest
|
||||
from api_lib import TASK_SUCCEEDED, APITest
|
||||
|
||||
|
||||
class PackagesAPITestShow(APITest):
|
||||
@@ -19,7 +19,7 @@ class PackagesAPITestShow(APITest):
|
||||
"pyspi_0.6.1-1.3.dsc", "pyspi_0.6.1-1.3.diff.gz", "pyspi_0.6.1.orig.tar.gz").status_code, 200)
|
||||
|
||||
resp = self.post_task("/api/repos/" + repo_name + "/file/" + d)
|
||||
self.check_equal(resp.json()['State'], 2)
|
||||
self.check_equal(resp.json()['State'], TASK_SUCCEEDED)
|
||||
|
||||
# get information about package
|
||||
pyspi_json = {
|
||||
|
||||
Reference in New Issue
Block a user