示例#1
0
def test_create_core_default():
    """Test `create_core` with factory defaults."""
    with temporary_config_file() as cfgfile:
        # std factory params
        core = create_core(cfgfile.name)
        assert isinstance(core, Core)
        assert core.auto_enable_auth == True
示例#2
0
文件: test_core.py 项目: fliem/gc3pie
def test_create_core_default():
    """Test `create_core` with factory defaults."""
    with temporary_config_file() as cfgfile:
        # std factory params
        core = create_core(cfgfile.name)
        assert_is_instance(core, Core)
        assert_equal(core.auto_enable_auth, True)
示例#3
0
def test_create_core_non_default():
    """Test `create_core` with non-default arguments."""
    with temporary_config_file() as cfgfile:
        # use a specific MatchMaker instance for equality testing
        mm = MatchMaker()
        core = create_core(cfgfile.name, matchmaker=mm)
        assert core.auto_enable_auth == True
        assert core.matchmaker == mm
示例#4
0
文件: test_core.py 项目: fliem/gc3pie
def test_create_core_non_default():
    """Test `create_core` with non-default arguments."""
    with temporary_config_file() as cfgfile:
        # use a specific MatchMaker instance for equality testing
        mm = MatchMaker()
        core = create_core(cfgfile.name, matchmaker=mm)
        assert_equal(core.auto_enable_auth, True)
        assert_equal(core.matchmaker, mm)
示例#5
0
def test_create_core_no_auto_enable_auth():
    """Test `create_core` without the "auto enable" feature."""
    with temporary_config_file() as cfgfile:
        # std factory params
        core = create_core(cfgfile.name, auto_enable_auth=False)
        assert core.auto_enable_auth == False
示例#6
0
文件: test_core.py 项目: fliem/gc3pie
def test_create_core_no_auto_enable_auth():
    """Test `create_core` without the "auto enable" feature."""
    with temporary_config_file() as cfgfile:
        # std factory params
        core = create_core(cfgfile.name, auto_enable_auth=False)
        assert_equal(core.auto_enable_auth, False)