From b07c9ad66780a6bc8dbd0f04c8b026d2864aedb8 Mon Sep 17 00:00:00 2001 From: Flowtter Date: Sun, 28 Jan 2024 18:32:16 +0100 Subject: [PATCH] feat: Add test Dockerfile --- crispy-api/Dockerfile.test | 14 ++++++++++++++ crispy-api/tests/tools/setup.py | 12 ++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 crispy-api/Dockerfile.test diff --git a/crispy-api/Dockerfile.test b/crispy-api/Dockerfile.test new file mode 100644 index 0000000..d476f47 --- /dev/null +++ b/crispy-api/Dockerfile.test @@ -0,0 +1,14 @@ +FROM python:3.10-slim +WORKDIR /app +RUN apt-get -y update +RUN apt-get install ffmpeg -y + +COPY requirements.txt . +COPY requirements-dev.txt . +RUN pip install -r requirements-dev.txt +COPY api api +COPY tests tests +COPY assets assets +COPY settings.json settings.json +COPY setup.cfg setup.cfg +CMD ["pytest"] diff --git a/crispy-api/tests/tools/setup.py b/crispy-api/tests/tools/setup.py index d805a38..808d5cc 100644 --- a/crispy-api/tests/tools/setup.py +++ b/crispy-api/tests/tools/setup.py @@ -98,14 +98,10 @@ async def test_handle_highlights_the_finals(tmp_path): ) assert Highlight.count_documents() == 1 - assert sorted(Highlight.find_one().usernames) == [ - "_raynox", - "heximius", - "raynox", - "sxi", - "sxr", - "sxr_", - ] + usernames = sorted(Highlight.find_one().usernames) + assert "heximius" in usernames + assert "raynox" in usernames + assert "sxr" in usernames shutil.rmtree(tmp_session) shutil.rmtree(tmp_resources)