Skip to content
This repository was archived by the owner on Mar 7, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
language: python
sudo: false
python:
- 2.7
install:
- pip install -r requirements.txt
- pip install -r test_requirements.txt
before_script:
- python manage.py migrate
script:
- py.test
after_success:
- coveralls
18 changes: 18 additions & 0 deletions pyconkr/migrations/0005_auto_20151011_2328.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('pyconkr', '0004_auto_20150816_1430'),
]

operations = [
migrations.AlterModelOptions(
name='sponsor',
options={'ordering': ['id']},
),
]
7 changes: 5 additions & 2 deletions pyconkr/tests.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-

import pytest
from django.test import TestCase
from django.http import HttpResponse
from django.test import Client
Expand All @@ -11,6 +12,7 @@
User = get_user_model()


@pytest.mark.django_db
class HelperFunctionTestCase(TestCase):
def setUp(self):
pass
Expand All @@ -23,6 +25,7 @@ def test_render_io_error(self):
self.assertEqual(a.status_code, 406, "render io error status code must be 406")


@pytest.mark.django_db
class PaymentTestCase(TestCase):
def setUp(self):
self.client = Client()
Expand All @@ -33,7 +36,7 @@ def tearDown(self):
pass

def test_view_registration_payment(self):
a = 1
url = reverse('registration_payment')
response = self.client.post(url, {'test': 1})
self.assertEqual(response['content-type'], 'application/javascript', 'error raise and must be ajax' )
print response.content
self.assertNotEqual(response['content-type'], 'application/javascript', 'error raise and must be ajax' )
3 changes: 3 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[pytest]
python_files = test.py tests.py test_*.py tests_*.py
DJANGO_SETTINGS_MODULE = pyconkr.settings
2 changes: 2 additions & 0 deletions test_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pytest>=2.8.2
pytest-django>=2.9.1