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())
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())
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())