예제 #1
0
def test_register_new_environment(database, cleanup):
    environment = EnvironmentManager(database)

    new_env = environment.register(
        address="http://localhost:5000/",
        provider="AWS",
        instance_type="EC2",
        state=2,
    )

    assert new_env.address == "http://localhost:5000/"
    assert new_env.provider == "AWS"
    assert new_env.instance_type == "EC2"
    assert new_env.state == 2
예제 #2
0
def test_first_new_environment(database, cleanup):
    environment = EnvironmentManager(database)

    environment.register(
        address="http://localhost:5000/",
        provider="AWS",
        instance_type="EC2",
        state=2,
    )

    result = environment.first(address="http://localhost:5000/")
    assert result.provider == "AWS"
    assert result.instance_type == "EC2"
    assert result.state == 2
예제 #3
0
def test_create_env_manager(database, cleanup):
    environments = EnvironmentManager(database)