'Tests model creation, and confirms error when trying to recreate model.'

def test_create(self):

    created_grade = PersistentSubsectionGrade.create_grade(**self.params)
    with self.assertNumQueries(1):
        read_grade = PersistentSubsectionGrade.read_grade(user_id=self.params['user_id'], usage_key=self.params['usage_key'])
        self.assertEqual(created_grade, read_grade)
        self.assertEqual(read_grade.visible_blocks.blocks, self.block_records)
    with self.assertRaises(IntegrityError):
        PersistentSubsectionGrade.create_grade(**self.params)
