Skip to content

Commit

Permalink
Re-deploy due to a stop on the remote server(2).
Browse files Browse the repository at this point in the history
  • Loading branch information
kirkoov committed Apr 26, 2024
1 parent 90dd6a2 commit 890c394
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM python:3.10
WORKDIR /app
ENV PIP_ROOT_USER_ACTION=ignore
RUN pip install --upgrade pip
COPY requirements_.txt .
RUN pip install -r requirements_.txt --no-cache-dir
COPY requirements.txt .
RUN pip install -r requirements.txt --no-cache-dir
COPY . .
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "backend.wsgi"]
5 changes: 2 additions & 3 deletions backend/conftest.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import pytest

from rest_framework.test import APIClient


@pytest.fixture(scope="session")
def get_standard_user_data_() -> dict:
yield {
return {
"url": "/api/users/",
"token_url": "/api/auth/token/login/",
"data": {
Expand All @@ -20,4 +19,4 @@ def get_standard_user_data_() -> dict:

@pytest.fixture(scope="session")
def api_client() -> APIClient:
yield APIClient()
return APIClient()
12 changes: 7 additions & 5 deletions backend/users/tests.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
import pytest
import random

import pytest
from django.contrib.auth import get_user_model
from django.db.utils import DataError
from rest_framework import status
Expand Down Expand Up @@ -288,11 +288,13 @@ def test_new_standard_user_hits_me_url_200_401(self):


@pytest.mark.django_db
def test_new_standard_user_hits_me_url_200_401(api_client,
get_standard_user_data_):
def test_new_standard_user_hits_me_url_200_401(
api_client, get_standard_user_data_
):
data = get_standard_user_data_["data"]
data["email"] = "standard@user.org"
data["username"] = "standardUser"
response = api_client.post(get_standard_user_data_["url"], data,
format="json")
response = api_client.post(
get_standard_user_data_["url"], data, format="json"
)
assert response.status_code == status.HTTP_201_CREATED

0 comments on commit 890c394

Please sign in to comment.