def test_update(self):
        notification = Notification.objects.all()[0]

        data = json.dumps({ 'read_at': datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%S') })

        response = self.client.put('/api/1.0/notification/%i/' % notification.id, data=data, content_type='application/json', **self.auth_headers) 

        self.assertEqual(response.status_code, 204)

        # Refresh
        notification = Notification.objects.all()[0]

        self.assertNotEqual(notification.read_at, None)
dataset/ETHPy150Open pandaproject/panda/panda/tests/test_api_notification.py/TestAPINotifications.test_update/original