Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)