Skip to content

Commit

Permalink
feat: Add test Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Flowtter committed Jan 28, 2024
1 parent fe5f14d commit b07c9ad
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
14 changes: 14 additions & 0 deletions crispy-api/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -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"]
12 changes: 4 additions & 8 deletions crispy-api/tests/tools/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b07c9ad

Please sign in to comment.