'Tests -
1. Without login, try to do a POST request and catch 401 error
2. Login and match 201 response code and correct response data
Param:
checks - list of strings to assert in successful response data'

def _test_model(self, name, data, path=None, checks=[]):

    if (not path):
        path = (get_path() if (name == 'event') else get_path(1, (name + 's')))
    response = self.post_request(path, data)
    self.assertEqual(401, response.status_code, msg=response.data)
    self._login_user()
    response = self.post_request(path, data)
    self.assertEqual(201, response.status_code, msg=response.data)
    self.assertIn('location', response.headers)
    self.assertIn((('Test' + name[0].upper()) + name[1:]), response.data)
    for string in checks:
        self.assertIn(string, response.data)
