Skip to content

Add tests for newer django and python #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 4, 2020
Merged
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
14 changes: 11 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@ language: python

python:
- "2.7"
- "3.5"
- "3.6"
- "3.7"

env:
- DJANGO_VERSION=1.8.18
- DJANGO_VERSION=1.11.6
- DJANGO_VERSION=1.11
- DJANGO_VERSION=2.2.9
- DJANGO_VERSION=3.0.2

matrix:
exclude:
- python: "2.7"
env: DJANGO_VERSION=3.0.2
- python: "2.7"
env: DJANGO_VERSION=2.2.9

install:
- "npm install -g npm"
Expand Down
5 changes: 3 additions & 2 deletions tests/test_functionality.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import datetime
import json
import os
import sys
import unittest
from django.utils import timezone, six
from django.utils import timezone
from react_render.django.render import render_component, RenderedComponent
from react_render.exceptions import ComponentRenderingError, ComponentSourceFileNotFound

Expand Down Expand Up @@ -70,7 +71,7 @@ def test_render_component_returns_a_rendered_component(self):
self.assertIsInstance(component, RenderedComponent)
self.assertEqual(component.output, '<span>Hello world!</span>')
self.assertEqual(component.output, str(component))
if six.PY2:
if sys.version_info[0] < 3:
self.assertEqual(component.output, unicode(component))

def test_can_get_a_components_serialized_props(self):
Expand Down