Skip to content

Commit

Permalink
Merge pull request #5 from open-craft/aayush/BB-3045-juniper-upgrade
Browse files Browse the repository at this point in the history
[BB-3045] Juniper Upgrade
  • Loading branch information
OmarIthawi authored Oct 5, 2020
2 parents 4a92d24 + 7aa9374 commit fb955a8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: python
python:
- "2.7"
- "3.5"

script: nosetests
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
git+https://github.com/edx/XBlock.git#egg=XBlock==0.4.12
git+https://github.com/edx/xblock-utils.git#egg=xblock-utils==1.0.2
django==1.11.29
XBlock~=1.3.1
xblock-utils~=2.1.1
django==2.2.15
mako==1.0.2
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def package_data(pkg, roots):

setup(
name='wistiavideo-xblock',
version='0.1',
version='0.2',
description='wistiavideo XBlock', # TODO: write a better description.
license='GPL v3',
packages=[
Expand Down
10 changes: 5 additions & 5 deletions wistiavideo/tests/test_xblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from xblock.runtime import KvsFieldData, DictKeyValueStore
from xblock.test.tools import (
assert_in, assert_equals, assert_true, assert_false, TestRuntime
TestRuntime
)

from wistiavideo import WistiaVideoXBlock
Expand All @@ -22,13 +22,13 @@ class WistiaXblockTests(WistiaXblockBaseTests, unittest.TestCase):
def test_media_id_property(self):
xblock = self.make_xblock()
xblock.href = 'https://example.wistia.com/medias/12345abcde'
assert_equals(xblock.media_id, '12345abcde')
self.assertEquals(xblock.media_id, '12345abcde')

def test_student_view(self):
xblock = self.make_xblock()

student_view_html = xblock.student_view()
assert_in(xblock.media_id, student_view_html.body_html())
self.assertIn(xblock.media_id, student_view_html.body_html())


class WistiaXblockValidationTests(WistiaXblockBaseTests, unittest.TestCase):
Expand All @@ -45,7 +45,7 @@ def test_validate_correct_inputs(self):
validation.add = Mock()
xblock.validate_field_data(validation, data)

assert_false(validation.add.called)
self.assertFalse(validation.add.called)

@patch('xblock.validation.ValidationMessage')
def test_validate_incorrect_inputs(self, ValidationMessage):
Expand All @@ -56,4 +56,4 @@ def test_validate_incorrect_inputs(self, ValidationMessage):
validation.add = Mock()

xblock.validate_field_data(validation, data)
assert_true(validation.add.called)
self.assertTrue(validation.add.called)
2 changes: 1 addition & 1 deletion wistiavideo/wistiavideo.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def validate_field_data(self, validation, data):
if data.href != '' and not VIDEO_URL_RE.match(data.href):
validation.add(ValidationMessage(
ValidationMessage.ERROR,
_(u"Incorrect video url, please recheck")
_("Incorrect video url, please recheck")
))

def resource_string(self, path):
Expand Down

0 comments on commit fb955a8

Please sign in to comment.