Skip to content

Commit

Permalink
Merge pull request #42 from Qabel/m/die-korrekturen
Browse files Browse the repository at this point in the history
corrections
  • Loading branch information
enkore authored Sep 27, 2016
2 parents 67d9733 + 79e97a1 commit acd87d5
Show file tree
Hide file tree
Showing 18 changed files with 562 additions and 315 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ trees
deployed
_venv
activate.sh
test-output/
18 changes: 18 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
from pathlib import Path

import pytest
from pytest_dbfixtures.factories.postgresql import init_postgresql_database

from django.conf import settings
from django.core import mail
from pytest_dbfixtures.utils import try_import
from rest_framework.test import APIClient

Expand All @@ -13,6 +16,21 @@
PUBLIC_KEY = b'\x85\x20\xf0\x09\x89\x30\xa7\x54\x74\x8b\x7d\xdc\xb4\x3e\xf7\x5a\x0d\xbf\x3a\x0d\x26\x38\x1a\xf4\xeb\xa4\xa9\x8e\xaa\x9b\x4e\x6a'


@pytest.fixture()
def tests_output_path():
output_path = Path(__file__).absolute().parent / 'test-output'
output_path.mkdir(exist_ok=True)
return output_path


@pytest.fixture()
def write_mail(tests_output_path):
def mail_writer(where, outbox_index=0):
with (tests_output_path / ('email-' + where)).with_suffix('.eml').open('wb') as file:
file.write(mail.outbox[outbox_index].message().as_bytes())
return mail_writer


@pytest.fixture
def public_key():
return PUBLIC_KEY
Expand Down
7 changes: 7 additions & 0 deletions index_service/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,10 @@ class PendingVerificationInline(admin.TabularInline):
class PendingUpdateRequestAdmin(admin.ModelAdmin):
readonly_fields = ('created',)
inlines = (PendingVerificationInline,)


@admin.register(models.DoneVerification)
class DoneVerificationAdmin(admin.ModelAdmin):
fields = ('id', 'state',)
readonly_fields = ('created',)
list_display = ('id', 'state', 'created',)
Binary file modified index_service/locale/de/LC_MESSAGES/django.mo
Binary file not shown.
Loading

0 comments on commit acd87d5

Please sign in to comment.