'Tests -
1. Without login, try to do a PUT request and catch 401 error
2. Login and match 200 response code and make sure that
data changed'

def _test_model(self, name, data, path=None, *args):

    if (not path):
        path = (get_path(1) if (name == 'event') else get_path(1, (name + 's'), 1))
    response = self._put(path, data)
    self.assertEqual(401, response.status_code, msg=response.data)
    self._login_user()
    response = self._put(path, data)
    self.assertEqual(200, response.status_code, msg=response.data)
    self.assertIn(('"Test%s"' % (name[0].upper() + name[1:])), response.data)
    for _ in args:
        self.assertIn(_, response.data, response.data)
