Exemple #1
0
    def test_get_all_fields(self):
        instance = MagicMock()

        expected = {"id", "name", "modificado"}

        result = ZoopObject.get_all_fields(instance)
        self.assertEqual(result, expected)
Exemple #2
0
    def test_get_all_fields():
        mocked_get_fields = MagicMock()
        instance = MagicMock(_allow_empty=False, get_fields=mocked_get_fields)

        ZoopObject.get_all_fields(instance)
        mocked_get_fields.assert_called_once()