.coverage
.coveragerc
coverage.xml
-nosetests.xml
pip-log.txt
/htmlcov
--- /dev/null
+.PHONY: deploy test
+
+
+deploy: src/redakcja/localsettings.py
+ pip install -r requirements/requirements.txt
+ src/manage.py migrate --noinput
+ src/manage.py collectstatic --noinput
+
+
+.ONESHELL:
+test:
+ cd src
+ coverage run --branch --source='.' ./manage.py test --settings=redakcja.settings.test; true
+ coverage html -d ../htmlcov.new
+ rm -rf ../htmlcov
+ mv ../htmlcov.new ../htmlcov
+ coverage report
+ rm .coverage
+++ /dev/null
-cd $WORKSPACE
-virtualenv -q ve
-source ./ve/bin/activate
-pip install -q -E ./ve -r requirements.txt
-pip install -q -E ./ve -r requirements-test.txt
-django-admin.py test --settings=redakcja.settings.test
+++ /dev/null
-[loggers]
-keys=root,fnp
-
-[handlers]
-keys=console
-
-[formatters]
-keys=default
-
-[logger_root]
-level=DEBUG
-handlers=console
-
-[logger_fnp]
-level=DEBUG
-handlers=console
-qualname=fnp
-propagate=0
-
-[formatter_default]
-format=%(asctime)s %(name)s/%(levelname)s :: %(module)s.%(funcName)s:%(lineno)d :: %(message)s
-datefmt=
-class=logging.Formatter
-
-[handler_console]
-class=StreamHandler
-level=DEBUG
-formatter=default
-args=(sys.stderr, )
\ No newline at end of file
+++ /dev/null
-[loggers]
-keys=root,fnp
-
-[handlers]
-keys=console
-
-[formatters]
-keys=default
-
-[logger_root]
-level=DEBUG
-handlers=console
-
-[logger_fnp]
-level=DEBUG
-handlers=console
-qualname=fnp
-propagate=0
-
-[formatter_default]
-format=%(asctime)s %(name)s/%(levelname)s :: %(module)s.%(funcName)s:%(lineno)d :: %(message)s
-datefmt=
-class=logging.Formatter
-
-[handler_console]
-class=FileHandler
-level=DEBUG
-formatter=default
-args=('redakcja.dev.log', )
+++ /dev/null
-django-nose==1.2
-nose
-nosexcover
-mock
-selenium
+++ /dev/null
--i https://py.mdrn.pl/simple
-
-## Python libraries
-Mercurial>=3.3,<3.4
-PyYAML>=3.0
-Pillow
-oauth2
-httplib2 # oauth2 dependency
-
-librarian
-
-## Django
-Django==1.11.20
-fnpdjango==0.3
-django-pipeline==1.6.14
-django_cas>=2.1,<2.2
-sorl-thumbnail>=12.2,<12.4 # ??
-django-maintenancemode>=0.9
-fnp-django-pagination==2.2.2
-django-gravatar2
-python-slugify
-django-extensions==1.5.7
-
-celery>=3.1.12,<3.2
-kombu>=3.0,<3.1
-
-raven
--- /dev/null
+django-debug-toolbar
--- /dev/null
+coverage
+mock
+selenium
--- /dev/null
+-i https://py.mdrn.pl/simple
+
+## Python libraries
+Mercurial>=3.3,<3.4
+PyYAML>=3.0
+Pillow
+oauth2
+httplib2 # oauth2 dependency
+
+librarian
+
+## Django
+Django==1.11.20
+fnpdjango==0.3
+django-pipeline==1.6.14
+django_cas>=2.1,<2.2
+sorl-thumbnail>=12.2,<12.4 # ??
+django-maintenancemode>=0.9
+fnp-django-pagination==2.2.2
+django-gravatar2
+python-slugify
+django-extensions==1.5.7
+
+celery>=3.1.12,<3.2
+kombu>=3.0,<3.1
+
+raven
def test_none_indexed(self):
- import nose.tools
self.book2 = Book.create(self.user, 'book 2', slug='book2')
self.make_gallery(self.book1, {
'1-0001_1l' : 'aa',
# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
-from nose.tools import *
from django.test import TestCase
from cover.forms import FlickrForm
-from nose.tools import *
from django.test import TestCase
from .models import ADocument
)
def test_empty_file(self):
- assert False
doc = ADocument.objects.create()
self.assertTextEqual(doc.materialize(), u"")
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import os.path
-from redakcja.settings.defaults import *
-from redakcja.localsettings import *
-
+from .defaults import *
+from ..localsettings import *
+import os
PROJECT_ROOT = os.path.realpath(os.path.dirname(os.path.dirname(__file__)))
(u'Radek Czajka', 'radoslaw.czajka@nowoczesnapolska.org.pl'),
)
+INTERNAL_IPS = ['127.0.0.1']
+
MANAGERS = ADMINS
# Local time zone for this installation. Choices can be found here:
-#
-# Nose tests
-#
-
from redakcja.settings import *
DATABASES = {
-from nose.tools import *
import wiki.models as models
import shutil
import tempfile
class TestStorageBase:
def setUp(self):
- self.dirpath = tempfile.mkdtemp(prefix='nosetest_')
+ self.dirpath = tempfile.mkdtemp(prefix='redakcja_test_')
def tearDown(self):
shutil.rmtree(self.dirpath)
def test_storage_empty(self):
storage = models.DocumentStorage(self.dirpath)
- eq_(storage.all(), [])
+ self.assertEqual(storage.all(), [])