-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor support application and update tests
- Loading branch information
Showing
4 changed files
with
0 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,15 @@ | ||
from rest_framework import serializers | ||
from rest_framework.serializers import ModelSerializer | ||
|
||
from .models import Contact, Report | ||
|
||
|
||
class ContactSerializer(ModelSerializer): | ||
is_new = serializers.ReadOnlyField() | ||
is_expired = serializers.ReadOnlyField() | ||
|
||
class Meta: | ||
model = Contact | ||
fields = "__all__" | ||
|
||
|
||
class ReportSerializer(ModelSerializer): | ||
is_new = serializers.ReadOnlyField() | ||
|
||
class Meta: | ||
model = Report | ||
fields = "__all__" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,8 +16,6 @@ def test_create_contact_success(): | |
assert contact.message == "Test test" | ||
assert contact.email == "[email protected]" | ||
assert contact.reviewed == False | ||
assert contact.is_new == True | ||
assert contact.is_expired == False | ||
|
||
|
||
@pytest.mark.django_db | ||
|
@@ -33,4 +31,3 @@ def test_create_report_success(user_data): | |
assert report.user == user_data | ||
assert report.offer == joboffer | ||
assert report.description == "dasdasda" | ||
assert report.is_new == True |