Skip to content

Commit

Permalink
travis.yml updated (#6)
Browse files Browse the repository at this point in the history
* Update README.rst

* Update README.rst

* coveralls script added

* test cases error fixed

* tests upgraded to python3

* Delete .coverage
  • Loading branch information
Anjaneyulu authored and ashwin31 committed Jun 1, 2016
1 parent f16031a commit 87e7880
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 16 deletions.
10 changes: 6 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
language: python

python:
- "2.6"
- "2.7"
- "3.2"
- "3.3"
- "3.4"
- "3.5"

install:
- python setup.py install
- pip install coveralls

script:
- python -m unittest discover
- python test_runner.py
- coverage run --source=payu test_runner.py

after_success:
coveralls
13 changes: 5 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
Django-PayU
==============
This package provides integration between `Django` and `PayU Payment Gateway`.

.. image:: https://travis-ci.org/MicroPyramid/django-payu.svg?branch=master
:target: https://travis-ci.org/MicroPyramid/django-payu

.. image:: https://coveralls.io/repos/github/MicroPyramid/django-payu/badge.svg?branch=master
:target: https://coveralls.io/github/MicroPyramid/django-payu?branch=master

.. image:: http://travis-ci.org/MicroPyramid/django-payu.svg?branch=master
:target: http://travis-ci.org/MicroPyramid/django-payu
.. image:: https://coveralls.io/repos/github/MicroPyramid/django-payu/badge.svg?branch=maste
:target: https://coveralls.io/github/MicroPyramid/django-payu?branch=master
.. image:: https://landscape.io/github/MicroPyramid/django-payu/master/landscape.svg?style=flat
:target: https://landscape.io/github/MicroPyramid/django-payu/master
:alt: Code Health
This package provides integration between `Django` and `PayU Payment Gateway`.
Quick start
------------

Expand Down
5 changes: 4 additions & 1 deletion payu/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
from django.utils.http import urlencode
from django.conf import settings
from hashlib import sha512
import urllib2
try:
import urllib.request as urllib2
except ImportError:
import urllib2
import json

KEYS = ('txnid', 'amount', 'productinfo', 'firstname', 'email',
Expand Down
4 changes: 1 addition & 3 deletions payu/tests.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
from django.test import TestCase

# Create your tests here.


class Sample(TestCase):

def test_addition(self):
Sum = 5+4
Sum = 5 + 4
self.assertEqual(Sum, 9)
19 changes: 19 additions & 0 deletions test_runner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import sys
import django
from django.conf import settings
from django.test.utils import get_runner


if __name__ == "__main__":
settings.configure(
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
}
},
)
django.setup()
TestRunner = get_runner(settings)
test_runner = TestRunner()
failures = test_runner.run_tests(["payu"])
sys.exit(bool(failures))

0 comments on commit 87e7880

Please sign in to comment.