Ejemplo n.º 1
0
    def test_gcs_operations_flight_permission_data_serializer(self):
        data = self._get_data_for_model('FlightPermission')
        flight_permission_serializer = FlightPermissionSerializer(data=data)
        required_keys = {'token'}

        self.assertTrue(flight_permission_serializer.is_valid())
        self.assertEqual(set(flight_permission_serializer.validated_data.keys()), required_keys)
        self.assertEqual(flight_permission_serializer.errors, dict())
Ejemplo n.º 2
0
 def test_gcs_operations_flight_permission_serializer(self):
     data = self._get_data_for_model('FlightPermission')
     flight_permission_serializer = FlightPermissionSerializer(data=data)
     self.assertTrue(flight_permission_serializer.is_valid())
     self.assertNotEqual(flight_permission_serializer.validated_data, dict)
     self.assertEqual(flight_permission_serializer.errors, dict())