From 156863722a2d96f2d3d6257b6bf9474d5e401053 Mon Sep 17 00:00:00 2001 From: root <Yorgo EL MOUBAYED> Date: Thu, 6 May 2021 16:32:21 +0200 Subject: [PATCH] Create test modules for urls, views and models --- dataproc/api/tests.py | 4 ---- dataproc/api/tests/__init__.py | 0 .../tests/__pycache__/__init__.cpython-38.pyc | Bin 0 -> 162 bytes .../tests/__pycache__/test_models.cpython-38.pyc | Bin 0 -> 165 bytes .../tests/__pycache__/test_urls.cpython-38.pyc | Bin 0 -> 720 bytes .../tests/__pycache__/test_views.cpython-38.pyc | Bin 0 -> 688 bytes dataproc/api/tests/test_models.py | 0 dataproc/api/tests/test_urls.py | 12 ++++++++++++ dataproc/api/tests/test_views.py | 15 +++++++++++++++ 9 files changed, 27 insertions(+), 4 deletions(-) delete mode 100644 dataproc/api/tests.py create mode 100644 dataproc/api/tests/__init__.py create mode 100644 dataproc/api/tests/__pycache__/__init__.cpython-38.pyc create mode 100644 dataproc/api/tests/__pycache__/test_models.cpython-38.pyc create mode 100644 dataproc/api/tests/__pycache__/test_urls.cpython-38.pyc create mode 100644 dataproc/api/tests/__pycache__/test_views.cpython-38.pyc create mode 100644 dataproc/api/tests/test_models.py create mode 100644 dataproc/api/tests/test_urls.py create mode 100644 dataproc/api/tests/test_views.py diff --git a/dataproc/api/tests.py b/dataproc/api/tests.py deleted file mode 100644 index af4d534..0000000 --- a/dataproc/api/tests.py +++ /dev/null @@ -1,4 +0,0 @@ -# Django imports -from django.test import TestCase - -# Create your tests here. diff --git a/dataproc/api/tests/__init__.py b/dataproc/api/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/dataproc/api/tests/__pycache__/__init__.cpython-38.pyc b/dataproc/api/tests/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cc2a0495fe423189b65fa3e71568611c3c44f9ee GIT binary patch literal 162 zcmWIL<>g`k0?VC~6F~H15P=LBfgA@QE@lA|DGb33nv8xc8Hzx{2;!H!enx(7s(xi^ zPHui_QetIlioQ!~adt_5fqq_Uxo%2<ZgFZ+S!QyoeoA6VVnI=UvVLMgrhZ9kaY?a$ fe0*kJW=VX!UP0w84x8Nkl+v73JCFsRftUdR9Cs*4 literal 0 HcmV?d00001 diff --git a/dataproc/api/tests/__pycache__/test_models.cpython-38.pyc b/dataproc/api/tests/__pycache__/test_models.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f015518269c7eee738c3994877dd1a5e488dc25b GIT binary patch literal 165 zcmWIL<>g`kf>}EzCxGb3AOaaM0yz#qT+9L_QW%06G#UL?G8BP?5yUSq{fzwFRQ<}- zoZS4<q{Pb96n&S};_Q<A0{y(ya@~{y-Qv`uvdrXE{glL##Db#yWc|c~O#PD7;*w%8 d8K0Y<lA2SjS5SG2!v@GM%}KQb+3^{O835yeDjom; literal 0 HcmV?d00001 diff --git a/dataproc/api/tests/__pycache__/test_urls.cpython-38.pyc b/dataproc/api/tests/__pycache__/test_urls.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c43bc74ab0d1670648fdcdd622ebc7284b704c04 GIT binary patch literal 720 zcmaJ;y>8S%5Z)i(opt9!6zL*S(YVODMv73RfPm(jkY<}@@ovCj{lkuZ(V<W!Z@>$X zl4sye+*0udh>Dp#h^}I!8O_XkzM1dy`EogDXurOHdGmxb_JfLjORzXWhhq$uS?*cQ z73Y)-FKVe|ov0+%(ogECnsWAn*~Ct6nVmR(Bh}1K&saYDi3lv`<AbxR?!0^Lpg%R> zaxu<=+qeLZ5@`L#;a79$+u&X`-O!gbxNicB6LdJh;F#i;DPg%4w@gVZaal5^gnu49 zlt}B|Xp$(MqQfH$JyN>ipZPWW%6oB*`K9cWJ3)jHN37K%9-=F{B%cI{Lt|zDT<D*F z9E^uRfMaqoG-a4zii8qy{$i9v@ZVTiVDI<K;(c4YV(Wa}4sXrY+2Wal4}IGejk`Ls z-4OzAs?rtK^rj1KS(vUWdL#icY6OE-w;d0ur;W9{lc=x%$_Df=fzDw(<)0q^lVJ6q zku_<hbz^F$^*GnMZtdVH&$K3fyO*#;&`4!3WYn8tNYR0`O+~ENc{(oarD@)^ad)7% w`wlUQI!5Kx0TNwpDt85|D6*zJDjBi%_K}i-mX7K1?#!nI40J-qAIePp0q=jbod5s; literal 0 HcmV?d00001 diff --git a/dataproc/api/tests/__pycache__/test_views.cpython-38.pyc b/dataproc/api/tests/__pycache__/test_views.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..31c7beac7c7081ddadc21d553e27fa6e6e5f6d4c GIT binary patch literal 688 zcmZ8fy>8S%5Z)i#G0Ekppy36OTqN!g1wxSmLTRqyr*N|v?-1_rA3N&{hc4CS4S0d1 z<Rz$ihHa_x3RKMaM08@L`Mfip`8?mO-|p}43bL<1zrTMXh4{_EwnY@2lH*eXE3B+V z!B17oMir{jg_a!aI%?t~mg1GLk&Ul~jX|w-ky!a!WXT<Mi)p4p`UcRSl?Wj@t7p*q zOokl?3vdV(7j2uO;FKI65`ZYA6@{|Ws%uebtBE)Y518=X3@)*v`R`5BiDy3}$HxR- zti_dF$s6g3Vl8jwm0F1#y;AeYs$0b>h)_?%9{SFKnYI1k?|xBh7CWX3`U1RT(l99z z!TFb8hO$O(DE)w@>MUeBL<sfAkW{0*kUGG=YY~13cR;;=&ht-Q1Njo_rW-z#OR)J1 zz|X$x^A;|TZGTMEi&+J^Eq&R$uFA`PmV1(kBbo)PJ?WR>kdp>G@8F!Loe)1J1VSeA zKz@64znhc)DyOu$)R?wxz?iUWOw-w+=JUiDR<(KKj)-d<dkYRZ7ZdQGgM3G+8slsy yM04!guxICGd(n*_bzHF7-@o+WY8>}Cc5N~9ejL+>^x0;h=iEI?O7)SPM1KLn=BmB` literal 0 HcmV?d00001 diff --git a/dataproc/api/tests/test_models.py b/dataproc/api/tests/test_models.py new file mode 100644 index 0000000..e69de29 diff --git a/dataproc/api/tests/test_urls.py b/dataproc/api/tests/test_urls.py new file mode 100644 index 0000000..f917177 --- /dev/null +++ b/dataproc/api/tests/test_urls.py @@ -0,0 +1,12 @@ +# Django imports +from django.test import SimpleTestCase +from django.urls import reverse, resolve + +# Views Imports +from api.views.input_view import storeInput + +class TestUrls(SimpleTestCase): + + def test_add_input_url_resolves(self): + url = reverse('store_input') + self.assertEquals(resolve(url).func, storeInput) \ No newline at end of file diff --git a/dataproc/api/tests/test_views.py b/dataproc/api/tests/test_views.py new file mode 100644 index 0000000..d84890a --- /dev/null +++ b/dataproc/api/tests/test_views.py @@ -0,0 +1,15 @@ +# Python imports +import json + +# Django imports +from django.test import TestCase, Client +from django.urls import reverse + +# Models imports + +class TestViews(TestCase): + + def test_sotreInput(self): + client = Client() + response = client.get(reverse('store_input')) + self.assertEquals(response.status_code, 200) -- GitLab