implement address update

This commit is contained in:
2021-06-27 12:20:36 +02:00
parent 101bc20923
commit 54a6686474
3 changed files with 32 additions and 1 deletions

View File

@ -39,6 +39,15 @@ class TestProfileEndpoint(unittest.TestCase):
"pronouns": "Monsieur",
"volunteerwork": "ja",
"freetext": "Hallo",
"address": {
"name": "Peeeda",
"street": "Bachstraße",
"house_number": "42x",
"additional": "oben",
"postcode": "23232",
"city": "Travemünde",
"country": "Deutschland"
}
}
response = self.client.post("/users/1/profile",
data=json.dumps(data),
@ -56,6 +65,9 @@ class TestProfileEndpoint(unittest.TestCase):
self.assertEqual("ja", profile.volunteerwork)
self.assertEqual("Hallo", profile.freetext)
address = profile.address
self.assertEqual(address.name, "Peeeda")
def test_get_profile(self):
login_data = {"username": "peter", "password": "geheim"}
login_response = self.client.post("/users/login",