Skip to content

Commit

Permalink
Merge pull request #1860 from SEED-platform/ft-unique-test-org
Browse files Browse the repository at this point in the history
ensure unique name for api TestOrg
  • Loading branch information
nllong committed Apr 29, 2019
2 parents 02277dc + 2d70f92 commit c9e1cfc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion seed/tests/api/test_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import json
import pprint
import time
import uuid

import requests
from builtins import str
Expand Down Expand Up @@ -277,9 +278,10 @@ def account(header, main_url, username, log):
# Create an organization
print('API Function: create_org\n'),
partmsg = 'create_org'
org_name = 'TestOrg_{}'.format(str(uuid.uuid4()))
payload = {
'user_id': user_pk,
'organization_name': 'TestOrg_JoZ2wSd2boQWifGau3qxdFFu76oIy9r0' # hopefully ensuring a unique org name
'organization_name': org_name # hopefully ensuring a unique org name
}
result = requests.post(main_url + '/api/v2/organizations/',
headers=header,
Expand Down

0 comments on commit c9e1cfc

Please sign in to comment.