From c8d907b6e1bc5f821659e0e8e2dfdb20de9d57b6 Mon Sep 17 00:00:00 2001 From: Karthik S Poojary <148403650+KarthiksSJEC@users.noreply.github.com> Date: Sat, 14 Feb 2026 09:53:37 +0000 Subject: [PATCH 1/3] Fix issue #11: added test_delete_profile test and changed name to userrname in create profile --- app/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 193 bytes app/__pycache__/main.cpython-312.pyc | Bin 0 -> 3767 bytes app/__pycache__/models.cpython-312.pyc | Bin 0 -> 892 bytes app/__pycache__/store.cpython-312.pyc | Bin 0 -> 206 bytes .../conftest.cpython-312-pytest-9.0.1.pyc | Bin 0 -> 720 bytes .../test_profile.cpython-312-pytest-9.0.1.pyc | Bin 0 -> 6528 bytes tests/test_profile.py | 10 +++++++++- 7 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 app/__pycache__/__init__.cpython-312.pyc create mode 100644 app/__pycache__/main.cpython-312.pyc create mode 100644 app/__pycache__/models.cpython-312.pyc create mode 100644 app/__pycache__/store.cpython-312.pyc create mode 100644 tests/__pycache__/conftest.cpython-312-pytest-9.0.1.pyc create mode 100644 tests/__pycache__/test_profile.cpython-312-pytest-9.0.1.pyc diff --git a/app/__pycache__/__init__.cpython-312.pyc b/app/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f52008e3cad1719ff9c4c2c4840e66ebda93579c GIT binary patch literal 193 zcmX@j%ge<81Z_?eGIfCTV-N=h7@>^M96-i&h7^VKTXD4?D6p_`N{F|D;Yk6%=)FHUk=g&RFYb( zp9VA~u^>|yECe(~A83kxe0*kJW=VX!UP0wA4x8Nkl+v73yCOEAW{_)&K`!~g%*e=i Li$S}H1;_yaT_`kE literal 0 HcmV?d00001 diff --git a/app/__pycache__/main.cpython-312.pyc b/app/__pycache__/main.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ed1663778841242d0dc1cb6862c00eb6377864da GIT binary patch literal 3767 zcmb7HU2Idy6`r|&cH+M{e@+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%UUo_Xji<^PbXU}cS)>a;{tiMnMF{+Dhiu407}vY=q9HQZ{3@O~ zWDmSii}YqKRG1e(5Z?c;glpe#gXG{>~LOcBpO3tw(A0h@1}Sa zC6v;@G)KFUYwYHbQQ>t0X+B9=o`n0~=Ur4bJOnI9Gn?|!HyDG&y~I`KG_y#637!Rn zx}r()kh_im2W8g}JqDGF3zRzvgHvV2yX7L@**BcYrYB+k41D&lpjtqiVH6B)^zD9t ztC7))fAqN@wfC<_hpN$`)#&iQWhtUO0fs>E?vXo3-aA&t<XSUu>54S{pRE9}+04s6J{dWsNQpkzmrfg&o=&^I`qP3k2c$f1 zn5Ay4PEY2xA8AS5qBdn}+*WvhBy;c-GHuFEkFx(n+!jXVk24Qn32x8~T)l;Y8`caX z{X!KTU_$Jv;)+>#NU~=FPhqZ9uxy923&0hjLs`yZ36Et5$|9Bn&0ioqFY(j((*G80 zrf8D4=_IhQh_Q=M*F=o*BlN>B&_oqYe2xx%fxiAZ8u$kaY%0hXu5|8y=vz~cE{IQ% zxQ^PZsC`3f-{|OG9C}gJS`hAdj$|y<+K?dsGIlHWZts0@A-0MKHw6LjdL|-asK$D5 z5_N{|pZ7oN-BY%I6JH_^PcL8IL>TX0JX~YV196KrOe|Uxptt3hvEnK3xz+RT=>36( zo>jcRCiw7)^7$pTfYYBKA<+cFs0;*)Ic&P{<)`LX;L^MpzJ literal 0 HcmV?d00001 diff --git a/app/__pycache__/models.cpython-312.pyc b/app/__pycache__/models.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f54d72ce15e9567ee1440671ec5bd833591270de GIT binary patch literal 892 zcmcIjO=}ZD7@pa$Y)aGmg;*qIRj@=fxl0jj1ufWE6cP3^j60KNakD$lY$%Brp(=XI zt-qo8Q@na;2LwSpcoPyYJ^9Y=M(V|z1N+P~&wRY^`^@a8Mq>d%d$%!(Utxs4nZdld z6`4K+a)1~L5yQ+%@W2W!Y`C4+11EGave13RoHvNM-1=yj`$D%+Jy2_>RBzfHB%#mWf91>%B5Z=gr;ehLzFC4gvdH%B^>~5$7z0ura;ljjn1C2NzjO^PLHab ziuhI`fpZ-yM5lDMEk@EaCm5)~r(bf%?W6kQ{)3~H=IhP(mnPRfG(S5{ zd49hBKiRun+54C)0X6b*^OV7rqk*g@Ra=_0r4P_8%`k6Oo-%{emvfJQuG{wq^*r*%`y*UxpXy{{~tl*B}4@ literal 0 HcmV?d00001 diff --git a/app/__pycache__/store.cpython-312.pyc b/app/__pycache__/store.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..710124b824e7413ee692070b47f18cad7168d5d1 GIT binary patch literal 206 zcmX@j%ge<81Z_?eG9`iZV-N=hn4yf%B0$D;hERq~hA4(q##E*h1{2KczG$)vkyGsFM+hiv@wi Z2WCb_#v2S06OtNuJ4&uFNEERFMFI12Hu(Sm literal 0 HcmV?d00001 diff --git a/tests/__pycache__/conftest.cpython-312-pytest-9.0.1.pyc b/tests/__pycache__/conftest.cpython-312-pytest-9.0.1.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d4b92605172fc042d817c87cfc3a4ec980f67f48 GIT binary patch literal 720 zcma)4y^GX96n`_B&Bxs>s3^xO9D%D=Fe})Kh?c@Nc4@*~GGTLOlQ1*OnydUcw6*g7 z1`+=fD?t&XRu*cvvKD%kZ<5Vj>%h$WnBRNv_ukCg;cx?RJ-hQFTcZ4CjDFFzvIfi#t9v~v2u6jg&qOn99-;^oymk9!RxgdZq{@>IJ|U! z%B4trEtK}t?4h1Zp@N?Vv^OTru##n(@57eH$2T;1QRN-KmJHs-T@r*SfQQ z*_ODpk&HC-rHjXjdvjJM^IY7L=F6BTR9Ep>T7-~KaOFF|5j-7!h25nM)P275c;^>o Ok*hLa{mk literal 0 HcmV?d00001 diff --git a/tests/__pycache__/test_profile.cpython-312-pytest-9.0.1.pyc b/tests/__pycache__/test_profile.cpython-312-pytest-9.0.1.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1dea62d811393c5792ad4c8c1ec3c8d720243ced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Vno{*_M$781`A332>cZ&Dn6)-Q=e+li!jiuL#(UVgxF literal 0 HcmV?d00001 diff --git a/tests/test_profile.py b/tests/test_profile.py index 6bf5e9f..c0fbbbb 100644 --- a/tests/test_profile.py +++ b/tests/test_profile.py @@ -13,7 +13,7 @@ def test_create_profile(clean_store): json={"username": "alice", "bio": "Backend developer", "age": 22}, ) assert response.status_code == 201 - assert response.json()["name"] == "alice" + assert response.json()["username"] == "alice" def test_get_profile(clean_store): @@ -29,3 +29,11 @@ def test_get_profile(clean_store): def test_get_nonexistent_profile(clean_store): response = client.get("/profile/nobody") assert response.status_code == 404 +def test_delete_profile(clean_store): + client.post("/profile", json={"username": "charlie", "bio": "tester"}) + response = client.delete("/profile/charlie") + assert response.status_code == 200 + assert response.json() == {"deleted": True} + # Verify it is actually gone + get_response = client.get("/profile/charlie") + assert get_response.status_code == 404 \ No newline at end of file From 7205f328cf429d5ba8ac048f7e50dc7ff994325a Mon Sep 17 00:00:00 2001 From: Karthik S Poojary <148403650+KarthiksSJEC@users.noreply.github.com> Date: Sat, 14 Feb 2026 10:05:54 +0000 Subject: [PATCH 2/3] Fix issue #11: added test_delete_profile test and test_delete_nonexistent_profile and changed name to userrname in create profile --- .../test_profile.cpython-312-pytest-9.0.1.pyc | Bin 6528 -> 7341 bytes tests/test_profile.py | 5 ++++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/__pycache__/test_profile.cpython-312-pytest-9.0.1.pyc b/tests/__pycache__/test_profile.cpython-312-pytest-9.0.1.pyc index 1dea62d811393c5792ad4c8c1ec3c8d720243ced..8b8da00f0405ca454019a3cf870e9673d27a2cd3 100644 GIT binary patch delta 297 zcmZoLUTevBnwOW00SL}|Ovp4~oyaG_m@!d3nJa~}g&|6yl1Yn4Bl7$fLP;k>Fx=r6?XT^uy&!9LncsZ!OzuLiD=cb77C<>o!O62E zTJ)WO%pzY90n)jW0W1f$>lcSjZhlH>PO4o|1W<|*h>J}pdr0c>e_~^2)c!2M#HbEd F4FC}EP)+~< delta 111 zcmZ2$*rJ~2H;pUrQ@HZn443QXQB-NNPwG@;06vX6`uS16Fl2*kw(lM7_@xIVM7 KGin!E00jVhY#V_9 diff --git a/tests/test_profile.py b/tests/test_profile.py index c0fbbbb..8628ac2 100644 --- a/tests/test_profile.py +++ b/tests/test_profile.py @@ -36,4 +36,7 @@ def test_delete_profile(clean_store): assert response.json() == {"deleted": True} # Verify it is actually gone get_response = client.get("/profile/charlie") - assert get_response.status_code == 404 \ No newline at end of file + assert get_response.status_code == 404 +def test_delete_nonexistent_profile(clean_store): + response = client.delete("/profile/does_not_exist") + assert response.status_code == 404 \ No newline at end of file From 85b593108157d99cf56dffed09440c9a46245596 Mon Sep 17 00:00:00 2001 From: Karthik S Poojary <148403650+KarthiksSJEC@users.noreply.github.com> Date: Sat, 14 Feb 2026 10:07:49 +0000 Subject: [PATCH 3/3] Fix issue #11: added test_delete_profile test and test_delete_nonexistent_profile and changed name to userrname in create profile --- .../test_profile.cpython-312-pytest-9.0.1.pyc | Bin 7341 -> 7341 bytes tests/test_profile.py | 2 ++ 2 files changed, 2 insertions(+) diff --git a/tests/__pycache__/test_profile.cpython-312-pytest-9.0.1.pyc b/tests/__pycache__/test_profile.cpython-312-pytest-9.0.1.pyc index 8b8da00f0405ca454019a3cf870e9673d27a2cd3..62f2c1094e13b8097d40e6d0b6bae1772f85bd50 100644 GIT binary patch delta 51 zcmZ2$xz>{RG%qg~0}!}-PRKOd$op7~QE~G}F-sOkt{RG%qg~0}!0`n2>3(k@v9}qr&EoVwNn78k@DHOBngs*cr7y3otRN7g+#R F0RVNO42u8& diff --git a/tests/test_profile.py b/tests/test_profile.py index 8628ac2..e21e9f4 100644 --- a/tests/test_profile.py +++ b/tests/test_profile.py @@ -29,6 +29,7 @@ def test_get_profile(clean_store): def test_get_nonexistent_profile(clean_store): response = client.get("/profile/nobody") assert response.status_code == 404 + def test_delete_profile(clean_store): client.post("/profile", json={"username": "charlie", "bio": "tester"}) response = client.delete("/profile/charlie") @@ -37,6 +38,7 @@ def test_delete_profile(clean_store): # Verify it is actually gone get_response = client.get("/profile/charlie") assert get_response.status_code == 404 + def test_delete_nonexistent_profile(clean_store): response = client.delete("/profile/does_not_exist") assert response.status_code == 404 \ No newline at end of file