コード例 #1
0
 def test_serialization(self, weight, max_score, block_key):
     """
     Tests serialization of a BlockRecord using the _asdict() method.
     """
     record = BlockRecord(block_key, weight, max_score)
     expected = OrderedDict([
         ("locator", block_key),
         ("weight", weight),
         ("max_score", max_score),
     ])
     self.assertEqual(expected, record._asdict())
コード例 #2
0
ファイル: test_models.py プロジェクト: longmen21/edx-platform
 def test_serialization(self, weight, max_score, block_key):
     """
     Tests serialization of a BlockRecord using the to_dict() method.
     """
     record = BlockRecord(block_key, weight, max_score)
     expected = OrderedDict([
         ("locator", block_key),
         ("weight", weight),
         ("max_score", max_score),
     ])
     self.assertEqual(expected, record._asdict())
コード例 #3
0
 def test_serialization(self, weight, raw_possible, block_key, graded):
     """
     Tests serialization of a BlockRecord using the _asdict() method.
     """
     record = BlockRecord(block_key, weight, raw_possible, graded)
     expected = OrderedDict([
         ("locator", block_key),
         ("weight", weight),
         ("raw_possible", raw_possible),
         ("graded", graded),
     ])
     self.assertEqual(expected, record._asdict())
コード例 #4
0
ファイル: test_models.py プロジェクト: CUCWD/edx-platform
 def test_serialization(self, weight, raw_possible, block_key, graded):
     """
     Tests serialization of a BlockRecord using the _asdict() method.
     """
     record = BlockRecord(block_key, weight, raw_possible, graded)
     expected = OrderedDict([
         ("locator", block_key),
         ("weight", weight),
         ("raw_possible", raw_possible),
         ("graded", graded),
     ])
     self.assertEqual(expected, record._asdict())