portal = context.getPortalObject()
portal_catalog = portal.portal_catalog

# --------------- FAKE DATA SET ---------------------

reference = "test_dataset"
portal_type = "Data Set"

query_dict = { "portal_type": portal_type,
               "reference" : reference}

result = portal_catalog(**query_dict)
if len(result) is 0:
  data_set = portal.data_set_module.newContent(
    portal_type = portal_type,
    reference = reference,
    title = "Fake Data for test")
  data_set.validate()

# --------------- FAKE DATA DESCRIPTOR ---------------------
reference = "test_dataset_fake_data_descriptor"
portal_type = "Data Descriptor"

data_descriptor = portal.data_descriptor_module.newContent(
  portal_type = portal_type,
  reference = reference,
  title = "Fake Data for test")

return "Fake Data created."
