Skip to content

Commit

Permalink
Merge 3bcc042 into 3efb19d
Browse files Browse the repository at this point in the history
  • Loading branch information
gunthercox committed Sep 15, 2018
2 parents 3efb19d + 3bcc042 commit 0277eb9
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 15 deletions.
Expand Up @@ -18,11 +18,7 @@ def handle(self, *args, **options):

chatterbot.train(chatterbot.training_data)

# Django 1.8 does not define SUCCESS
if hasattr(self.style, 'SUCCESS'):
style = self.style.SUCCESS
else:
style = self.style.NOTICE
style = self.style.SUCCESS

self.stdout.write(style('Starting training...'))
training_class = chatterbot.trainer.__class__.__name__
Expand Down
4 changes: 2 additions & 2 deletions docs/testing.rst
Expand Up @@ -91,8 +91,8 @@ A few examples include:
.. code-block:: bash
# Run the tests with Django 1.10
tox -e django110
# Run the tests with Django 2.0
tox -e django20
.. code-block:: bash
Expand Down
4 changes: 2 additions & 2 deletions examples/django_app/example_app/urls.py
@@ -1,10 +1,10 @@
from django.conf.urls import include, url
from django.conf.urls import url
from django.contrib import admin
from example_app.views import ChatterBotAppView, ChatterBotApiView


urlpatterns = [
url(r'^$', ChatterBotAppView.as_view(), name='main'),
url(r'^admin/', include(admin.site.urls), name='admin'),
url(r'^admin/', admin.site.urls, name='admin'),
url(r'^api/chatterbot/', ChatterBotApiView.as_view(), name='chatterbot'),
]
2 changes: 1 addition & 1 deletion examples/django_app/tests/test_api.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import json
from django.test import TestCase
from django.core.urlresolvers import reverse
from django.urls import reverse


class ApiTestCase(TestCase):
Expand Down
2 changes: 1 addition & 1 deletion examples/django_app/tests/test_example.py
@@ -1,6 +1,6 @@
import json
from django.test import TestCase
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.encoding import force_text


Expand Down
3 changes: 2 additions & 1 deletion setup.py
Expand Up @@ -64,11 +64,12 @@
'Topic :: Communications :: Chat',
'Topic :: Internet',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3 :: Only',
],
test_suite='tests'
)
6 changes: 3 additions & 3 deletions tox.ini
Expand Up @@ -5,8 +5,8 @@ skipsdist = True
passenv = DJANGO_SETTINGS_MODULE NLTK_DATA PYTHONPATH HOME DISPLAY
setenv = PYTHONDONTWRITEBYTECODE=1
deps =
django18: Django>=1.8,<1.9
django111: Django>=1.11,<1.12
django20: Django>=2.0,<2.1
-rrequirements.txt
-rdev-requirements.txt

Expand All @@ -15,13 +15,13 @@ commands =
nosetests
nosetests examples

[testenv:django18]
[testenv:django111]
commands =
python setup.py develop --no-deps
python runtests.py
python examples/django_app/manage.py test examples/django_app/

[testenv:django111]
[testenv:django20]
commands =
python setup.py develop --no-deps
python runtests.py
Expand Down

0 comments on commit 0277eb9

Please sign in to comment.