# Path: test/framework/api_select.py
# def api(file_name, api_type, login=None, fixed_prefix=None, url_or_dir=None, fake_public_uri=None, invocation_class=None,
#         username=None, password=None):
# 
# Path: test/cfg.py
# class ApiType(Enum):
#     JENKINS = 0
#     SCRIPT = 1
#     MOCK = 2


import pytest
from .. import jenkins_api
from .framework import api_select
from .cfg import ApiType
# Copyright (c) 2012 - 2015 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.




@pytest.mark.not_apis(ApiType.MOCK, ApiType.SCRIPT)
def test_api_class_repr_job(api_type):
    api = api_select.api(__file__, api_type, login=True)
    job = jenkins_api.ApiJob(api, {}, 'my-job')

    jrd = eval(repr(job))

# Path: test/framework/api_select.py
# def api(file_name, api_type, login=None, fixed_prefix=None, url_or_dir=None, fake_public_uri=None, invocation_class=None,
#         username=None, password=None):
# 
# Path: test/cfg.py
# class ApiType(Enum):
#     JENKINS = 0
#     SCRIPT = 1
#     MOCK = 2


# Path: test/api_class_repr_test.py
import pytest
from .. import jenkins_api
from .framework import api_select
from .cfg import ApiType

# Copyright (c) 2012 - 2015 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.




@pytest.mark.not_apis(ApiType.MOCK, ApiType.SCRIPT)
def test_api_class_repr_job(api_type):
    api = api_select.api(__file__, api_type, login=True)
    job = jenkins_api.ApiJob(api, {}, 'my-job')

    jrd = eval(repr(job))

    assert jrd == {'name': 'my-job', 'dct': {}}