def test_receivers(self):
        request = HttpRequest()

        # ScriptSpecificMetadata
        request.POST = {'scriptLanguage': 'R', 'languageVersion': '3.5'}

        data = script_metadata_pre_create_handler(sender=ScriptResource,
                                                  element_name="ScriptSpecificMetadata",
                                                  request=request)
        self.assertTrue(data["is_valid"])

        request.POST = None

        data = script_metadata_pre_create_handler(sender=ScriptResource,
                                                  element_name="ScriptSpecificMetadata",
                                                  request=request)
        self.assertFalse(data["is_valid"])

        data = script_pre_create(sender=ScriptResource,
                                 metadata=[], source_names=[],
                                 files=None)

        self.assertEqual(data[0]['scriptspecificmetadata'], {})

        request.POST = {'scriptLanguage': 'R', 'languageVersion': '3.5'}

        data = script_metadata_pre_update_handler(sender=ScriptResource,
                                                  element_name="ScriptSpecificMetadata",
                                                  request=request)

        self.assertTrue(data["is_valid"])

        request.POST = None

        data = script_metadata_pre_update_handler(sender=ScriptResource,
                                                  element_name="ScriptSpecificMetadata",
                                                  request=request)

        self.assertFalse(data["is_valid"])