forked from pulp/pulp-smash
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kersom
committed
Feb 22, 2018
1 parent
728932a
commit 18e4783
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# coding=utf-8 | ||
"""Tests that perform actions over Artifacts.""" | ||
from random import choice | ||
import unittest | ||
import os | ||
import sys | ||
from requests.exceptions import HTTPError | ||
from io import BytesIO | ||
|
||
from pulp_smash import api, config, selectors, utils | ||
from pulp_smash.constants import FILE_URL | ||
from pulp_smash.tests.pulp3.constants import ARTIFACTS_PATH | ||
from pulp_smash.tests.pulp3.pulpcore.utils import set_up_module as setUpModule # noqa pylint:disable=unused-import | ||
from pulp_smash.tests.pulp3.utils import clean_artifacts, get_auth | ||
|
||
|
||
class FileUploadTestCase(unittest.TestCase, utils.SmokeTest): | ||
"""Create an Artifact by uploading a file.""" | ||
|
||
def test_all(self): | ||
"""Create an Artifact by uploading a file.""" | ||
cfg = config.get_config() | ||
client = api.Client(cfg, api.json_handler) | ||
file = utils.http_get(FILE_URL) | ||
files = {'file': file} | ||
# rv = client.post('/api/v3/artifacts/', files=files) | ||
|
||
# artifacts = client.get('api/v3/content/file/') | ||
clean_artifacts() | ||
|
||
# Clean content first |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters