Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
Also update travis.yml for new rq version testing
  • Loading branch information
coolhacker authored and Ivan Kiryanov committed Feb 1, 2020
1 parent 61a8482 commit 5000b3d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ python:
env:
- RQ_VERSION="rq==1.0"
- RQ_VERSION="rq==1.1"
- RQ_VERSION="rq==1.2"
- RQ_VERSION="-e git+https://github.com/rq/rq#egg=rq"

install:
Expand Down
9 changes: 8 additions & 1 deletion tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import unittest

import redis
from rq import Queue, Worker, pop_connection, push_connection
from rq import Queue, Worker, pop_connection, push_connection, version

from rq_dashboard.cli import make_flask_app

Expand Down Expand Up @@ -84,6 +84,13 @@ def test_registry_jobs_list(self):
self.assertIsInstance(data, dict)
self.assertIn('jobs', data)

@unittest.skipIf(not version.VERSION.startswith('1.2'), 'Skipping 1.2 tests, because running with %s' % version.VERSION )
def test_scheduled_registry_jobs_list(self):
response = self.client.get('/0/data/jobs/default/scheduled/8/1.json')
self.assertEqual(response.status_code, HTTP_OK)
data = json.loads(response.data.decode('utf8'))
self.assertIsInstance(data, dict)

def test_worker_python_version_field(self):
w = Worker(['q'])
w.register_birth()
Expand Down

0 comments on commit 5000b3d

Please sign in to comment.