From 2d8f509153ca2b094baa57bc331f9391d1e87b27 Mon Sep 17 00:00:00 2001 From: Evan Blaudy Date: Tue, 27 Feb 2024 05:04:01 +0100 Subject: [PATCH] [persons] use data/persons route instead of data/persons/new for creating a person --- gazu/person.py | 2 +- tests/test_person.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gazu/person.py b/gazu/person.py index d74b39ac..52742a66 100644 --- a/gazu/person.py +++ b/gazu/person.py @@ -210,7 +210,7 @@ def new_person( person = get_person_by_email(email, client=client) if person is None: person = raw.post( - "data/persons/new", + "data/persons", { "first_name": first_name, "last_name": last_name, diff --git a/tests/test_person.py b/tests/test_person.py index 11b68d44..578fd213 100644 --- a/tests/test_person.py +++ b/tests/test_person.py @@ -106,7 +106,7 @@ def test_new_person(self): mock_route( mock, "GET", "data/persons?email=john@gmail.com", text=[] ) - mock_route(mock, "POST", "data/persons/new", text=result) + mock_route(mock, "POST", "data/persons", text=result) self.assertEqual( gazu.person.new_person( "Jhon",