Skip to content

Commit

Permalink
[IMP] Change user customer to initial so that the customer can be rem…
Browse files Browse the repository at this point in the history
…oved
  • Loading branch information
c8y3 committed Oct 7, 2024
1 parent c6f4107 commit 1f54ffd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/tests_rest_customers.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from iris import Iris

_PERMISSION_CUSTOMERS_WRITE = 0x80
_IRIS_INITIAL_CLIENT_IDENTIFIER = 1


class TestsRestCustomers(TestCase):
Expand All @@ -28,6 +29,11 @@ def setUp(self) -> None:
self._subject = Iris()

def tearDown(self):
users = self._subject.get('/manage/users/list').json()
for user in users['data']:
identifier = user['user_id']
body = {'customers_membership': [_IRIS_INITIAL_CLIENT_IDENTIFIER]}
self._subject.create(f'/manage/users/{identifier}/customers/update', body)
self._subject.clear_database()

def test_create_customer_should_return_200_when_user_has_customer_write_right(self):
Expand Down

0 comments on commit 1f54ffd

Please sign in to comment.