def test_missing_data(self, update_config):
        data = {
            'latitude': 1.0,
            'longitude': 1.1,
            'device': '123',
            'id': 'Home',
            'trigger': 'enter'
        }

        # No data
        req = requests.get(_url({}))
        self.assertEqual(422, req.status_code)

        # No latitude
        copy = data.copy()
        del copy['latitude']
        req = requests.get(_url(copy))
        self.assertEqual(422, req.status_code)

        # No device
        copy = data.copy()
        del copy['device']
        req = requests.get(_url(copy))
        self.assertEqual(422, req.status_code)

        # No location
        copy = data.copy()
        del copy['id']
        req = requests.get(_url(copy))
        self.assertEqual(422, req.status_code)

        # No trigger
        copy = data.copy()
        del copy['trigger']
        req = requests.get(_url(copy))
        self.assertEqual(422, req.status_code)

        # Test message
        copy = data.copy()
        copy['trigger'] = 'test'
        req = requests.get(_url(copy))
        self.assertEqual(200, req.status_code)

        # Unknown trigger
        copy = data.copy()
        copy['trigger'] = 'foobar'
        req = requests.get(_url(copy))
        self.assertEqual(422, req.status_code)
Attach an animation to the JSON representation.
dataset/ETHPy150Open home-assistant/home-assistant/tests/components/device_tracker/test_locative.py/TestLocative.test_missing_data--crossover with--dataset/ETHPy150Open turbulenz/turbulenz_tools/turbulenz_tools/tools/asset2json.py/JsonAsset.attach_animation