Skip to content

Commit a6267ae

Browse files
authored
Add tests for newer django and python (mic159#23)
* Adding more modern djangos to test matrix * No more six
1 parent 0a0e239 commit a6267ae

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

.travis.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,20 @@ language: python
22

33
python:
44
- "2.7"
5-
- "3.5"
65
- "3.6"
6+
- "3.7"
77

88
env:
9-
- DJANGO_VERSION=1.8.18
10-
- DJANGO_VERSION=1.11.6
9+
- DJANGO_VERSION=1.11
10+
- DJANGO_VERSION=2.2.9
11+
- DJANGO_VERSION=3.0.2
12+
13+
matrix:
14+
exclude:
15+
- python: "2.7"
16+
env: DJANGO_VERSION=3.0.2
17+
- python: "2.7"
18+
env: DJANGO_VERSION=2.2.9
1119

1220
install:
1321
- "npm install -g npm"

tests/test_functionality.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import datetime
22
import json
33
import os
4+
import sys
45
import unittest
5-
from django.utils import timezone, six
6+
from django.utils import timezone
67
from react_render.django.render import render_component, RenderedComponent
78
from react_render.exceptions import ComponentRenderingError, ComponentSourceFileNotFound
89

@@ -70,7 +71,7 @@ def test_render_component_returns_a_rendered_component(self):
7071
self.assertIsInstance(component, RenderedComponent)
7172
self.assertEqual(component.output, '<span>Hello world!</span>')
7273
self.assertEqual(component.output, str(component))
73-
if six.PY2:
74+
if sys.version_info[0] < 3:
7475
self.assertEqual(component.output, unicode(component))
7576

7677
def test_can_get_a_components_serialized_props(self):

0 commit comments

Comments
 (0)