Revision d915cf3c
b/snf-astakos-app/astakos/im/functions.py | ||
---|---|---|
511 | 511 |
|
512 | 512 |
|
513 | 513 |
def enroll_member(project_id, user, request_user=None, reason=None): |
514 |
project = get_project_for_update(project_id) |
|
515 | 514 |
try: |
516 | 515 |
project = get_project_for_update(project_id) |
517 | 516 |
except ProjectNotFound as e: |
b/snf-astakos-app/astakos/im/tests/projects.py | ||
---|---|---|
352 | 352 |
status, body = self.enroll(project_id, self.user1, h_owner) |
353 | 353 |
self.assertEqual(status, 409) |
354 | 354 |
|
355 |
# Enroll fails, project does not exist |
|
356 |
status, body = self.enroll(-1, self.user1, h_owner) |
|
357 |
self.assertEqual(status, 409) |
|
358 |
|
|
355 | 359 |
# Get projects |
356 | 360 |
## Simple user mode |
357 | 361 |
r = client.get(reverse("api_projects"), **h_plain) |
Also available in: Unified diff