Пример #1
0
def test_nonDeclaredAttr():
    """ Tests that an argument not in the list of arguments to serialized
      is not serialized
  """

    objData = Serializable()
    objData.notToBeSerialized = 1

    encodedData = jsonEncode(objData)
    decodedData, _lenData = jsonDecode(encodedData)

    assert not hasattr(decodedData, 'notToBeSerialized')
Пример #2
0
def test_nonDeclaredAttr():
  """ Tests that an argument not in the list of arguments to serialized
      is not serialized
  """

  objData = Serializable()
  objData.notToBeSerialized = 1

  encodedData = jsonEncode(objData)
  decodedData, _lenData = jsonDecode(encodedData)

  assert not hasattr(decodedData, 'notToBeSerialized')