Exemple #1
0
def test_create_core_default():
    """Test `create_core` with factory defaults."""
    with temporary_config() as cfgfile:
        # std factory params
        core = create_core(cfgfile.name)
        assert_is_instance(core, Core)
        assert_equal(core.auto_enable_auth, True)
Exemple #2
0
def test_create_core_default():
    """Test `create_core` with factory defaults."""
    with temporary_config() as cfgfile:
        # std factory params
        core = create_core(cfgfile.name)
        assert_is_instance(core, Core)
        assert_equal(core.auto_enable_auth, True)
Exemple #3
0
def test_create_engine_non_default2():
    """Test `create_engine` with several non-default arguments."""
    with temporary_config() as cfgfile:
        engine = create_engine(cfgfile.name,
                               can_submit=False,
                               max_in_flight=1234)
        assert_equal(engine.can_submit, False)
        assert_equal(engine.max_in_flight, 1234)
Exemple #4
0
def test_create_core_non_default():
    """Test `create_core` with non-default arguments."""
    with temporary_config() 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)
Exemple #5
0
def test_create_core_non_default():
    """Test `create_core` with non-default arguments."""
    with temporary_config() 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)
Exemple #6
0
def test_create_engine_non_default2():
    """Test `create_engine` with several non-default arguments."""
    with temporary_config() as cfgfile:
        engine = create_engine(cfgfile.name,
                               can_submit=False,
                               max_in_flight=1234)
        assert_equal(engine.can_submit, False)
        assert_equal(engine.max_in_flight, 1234)
Exemple #7
0
def test_create_engine_with_core_options():
    """Test `create_engine` with a mix of Engine and Core options."""
    with temporary_config() as cfgfile:
        # use a specific MatchMaker instance for equality testing
        mm = MatchMaker()
        engine = create_engine(cfgfile.name,
                               can_submit=False,
                               matchmaker=mm,
                               auto_enable_auth=False)
        assert_equal(engine.can_submit, False)
        assert_equal(engine._core.matchmaker, mm)
        assert_equal(engine._core.auto_enable_auth, False)
Exemple #8
0
def test_create_engine_with_core_options():
    """Test `create_engine` with a mix of Engine and Core options."""
    with temporary_config() as cfgfile:
        # use a specific MatchMaker instance for equality testing
        mm = MatchMaker()
        engine = create_engine(cfgfile.name,
                               can_submit=False,
                               matchmaker=mm,
                               auto_enable_auth=False)
        assert_equal(engine.can_submit, False)
        assert_equal(engine._core.matchmaker, mm)
        assert_equal(engine._core.auto_enable_auth, False)
Exemple #9
0
def test_create_engine_non_default1():
    """Test `create_engine` with one non-default argument."""
    with temporary_config() as cfgfile:
        engine = create_engine(cfgfile.name, can_submit=False)
        assert_equal(engine.can_submit, False)
Exemple #10
0
def test_create_engine_default():
    """Test `create_engine` with factory defaults."""
    with temporary_config() as cfgfile:
        # std factory params
        engine = create_engine(cfgfile.name)
        assert_is_instance(engine, Engine)
Exemple #11
0
def test_create_core_no_auto_enable_auth():
    """Test `create_core` without the "auto enable" feature."""
    with temporary_config() as cfgfile:
        # std factory params
        core = create_core(cfgfile.name, auto_enable_auth=False)
        assert_equal(core.auto_enable_auth, False)
Exemple #12
0
def test_create_core_no_auto_enable_auth():
    """Test `create_core` without the "auto enable" feature."""
    with temporary_config() as cfgfile:
        # std factory params
        core = create_core(cfgfile.name, auto_enable_auth=False)
        assert_equal(core.auto_enable_auth, False)
Exemple #13
0
def test_create_engine_non_default1():
    """Test `create_engine` with one non-default argument."""
    with temporary_config() as cfgfile:
        engine = create_engine(cfgfile.name, can_submit=False)
        assert_equal(engine.can_submit, False)
Exemple #14
0
def test_create_engine_default():
    """Test `create_engine` with factory defaults."""
    with temporary_config() as cfgfile:
        # std factory params
        engine = create_engine(cfgfile.name)
        assert_is_instance(engine, Engine)