from obsapi.sourceapi import ObsSourceApi
prj = 'home:sbahling:obsapi:test'
pkg = 'suse-hello-1.0'
repo = 'SLE_12_SP3'
arch = 'x86_64'
sourceapi = ObsSourceApi(apiurl='https://api.opensuse.org')
def test_source_get_prj():
xml = sourceapi.get(prj)
assert '' in xml
def test_source_get_pkg():
xml = sourceapi.get(prj, pkg)
assert ''.format(prj) in xml
def test_source_get_meta_pkg():
xml = sourceapi.get_meta(prj, pkg)
assert ''.format(pkg, prj) in xml
def test_source_get_prj_attributes():
xml = sourceapi.get_attribute(prj)
assert '' in xml
def test_source_get_prj_attribute():
xml = sourceapi.get_attribute(prj, attribute='OBS:Screenshots')
assert '' in xml
assert 'name="Screenshots"' in xml
assert 'namespace="OBS"' in xml
def test_source_get_pkg_attributes():
xml = sourceapi.get_attribute(prj, pkg)
assert '' in xml
assert 'name="Screenshots"' in xml
assert 'namespace="OBS"' in xml
def test_source_get_prj_config():
config = sourceapi.get_config(prj)
assert 'Macros:' in config
def test_source_get_prj_pubkey():
pubkey = sourceapi.get_pubkey(prj)
assert '-BEGIN PGP PUBLIC KEY BLOCK-' in pubkey
def test_source_get_history():
xml = sourceapi.get_history(prj, pkg)
assert '' in xml