'Test primitive tab deletion.'

def test_delete(self):

    course = CourseFactory.create()
    with self.assertRaises(ValueError):
        tabs.primitive_delete(course, 0)
    with self.assertRaises(ValueError):
        tabs.primitive_delete(course, 1)
    with self.assertRaises(IndexError):
        tabs.primitive_delete(course, 6)
    tabs.primitive_delete(course, 2)
    self.assertNotIn({u'type': u'textbooks'}, course.tabs)
    self.assertEquals(course.tabs[2], {'type': 'discussion', 'name': 'Discussion'})
