Commit b741ce78 by Chris Dodge Committed by Davorin Sego

fix python unit tests

parent 2972e911
...@@ -65,7 +65,7 @@ def i_should_be_on_the_dashboard(step): ...@@ -65,7 +65,7 @@ def i_should_be_on_the_dashboard(step):
@step(u'I (?:visit|access|open) the courses page$') @step(u'I (?:visit|access|open) the courses page$')
def i_am_on_the_courses_page(step): def i_am_on_the_courses_page(step):
world.visit('/courses') world.visit('/courses')
assert world.is_css_present('section.courses') assert world.is_css_present('div.courses')
@step(u'I press the "([^"]*)" button$') @step(u'I press the "([^"]*)" button$')
......
...@@ -220,7 +220,7 @@ class IndexPageCourseCardsSortingTests(ModuleStoreTestCase): ...@@ -220,7 +220,7 @@ class IndexPageCourseCardsSortingTests(ModuleStoreTestCase):
self.assertNotIn('<aside aria-label="Refine your search" class="search-facets phone-menu">', response.content) self.assertNotIn('<aside aria-label="Refine your search" class="search-facets phone-menu">', response.content)
# make sure we have the special css class on the section # make sure we have the special css class on the section
self.assertIn('<section class="courses no-course-discovery">', response.content) self.assertIn('<div class="courses no-course-discovery"', response.content)
@patch('student.views.render_to_response', RENDER_MOCK) @patch('student.views.render_to_response', RENDER_MOCK)
@patch('courseware.views.render_to_response', RENDER_MOCK) @patch('courseware.views.render_to_response', RENDER_MOCK)
...@@ -239,10 +239,10 @@ class IndexPageCourseCardsSortingTests(ModuleStoreTestCase): ...@@ -239,10 +239,10 @@ class IndexPageCourseCardsSortingTests(ModuleStoreTestCase):
response = self.client.get(reverse('branding.views.courses')) response = self.client.get(reverse('branding.views.courses'))
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)
# assert that the course discovery UI is not present # assert that the course discovery UI is present
self.assertIn('Search for a course', response.content) self.assertIn('Search for a course', response.content)
self.assertIn('<aside aria-label="Refine your search" class="search-facets phone-menu">', response.content) self.assertIn('<aside aria-label="Refine your search" class="search-facets phone-menu">', response.content)
self.assertIn('<section class="courses">', response.content) self.assertIn('<div class="courses"', response.content)
@patch('student.views.render_to_response', RENDER_MOCK) @patch('student.views.render_to_response', RENDER_MOCK)
@patch('courseware.views.render_to_response', RENDER_MOCK) @patch('courseware.views.render_to_response', RENDER_MOCK)
......
...@@ -11,7 +11,7 @@ define([ ...@@ -11,7 +11,7 @@ define([
return Backbone.View.extend({ return Backbone.View.extend({
el: 'section.courses', el: 'div.courses',
$window: $(window), $window: $(window),
$document: $(document), $document: $(document),
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
</div> </div>
% endif % endif
<section class="courses ${'' if course_discovery_enabled else ' no-course-discovery'}" role="region" aria-label="${_('List of Courses')}"> <div class="courses${'' if course_discovery_enabled else ' no-course-discovery'}" role="region" aria-label="${_('List of Courses')}">
<ul class="courses-listing"> <ul class="courses-listing">
%for course in courses: %for course in courses:
<li class="courses-listing-item"> <li class="courses-listing-item">
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
</li> </li>
%endfor %endfor
</ul> </ul>
</section> </div>
% if course_discovery_enabled: % if course_discovery_enabled:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment