# retoor <retoor@molodetz.nl>

import requests
from tests.conftest import BASE_URL
from devplacepy.database import get_table


def test_containers_admin_data_returns_json(alice, seeded_db):
    s = requests.Session()
    s.post(
        f"{BASE_URL}/auth/login",
        data={
            "email": seeded_db["alice"]["email"],
            "password": seeded_db["alice"]["password"],
        },
    )
    r = s.get(f"{BASE_URL}/admin/containers/data")
    assert r.status_code == 200
    data = r.json()
    assert "instances" in data
    assert isinstance(data["instances"], list)
