chicommons / maps

MIT License
5 stars 17 forks source link

Backend: Writing unittests for models file #41

Open laredotornado opened 3 years ago

laredotornado commented 3 years ago

We need to start fleshing out our unit tests a little more thoroughly. This ticket focuses on the application models -- the file, directory/models.py. Ideally, we should use pytest for this. Since it is not installed, we will want to install it

cd web
. venv/bin/activate
pip install pytest

and then save the module in our requirements file ...

pip freeze > requirements.txt

When writing the tests, you will notice there is already a test file, tests/test_models.py . This was my initial attempt to create some tests using the default unittest module. You can delete this file and create one of your own. For now, let's just test taht we can create each model. The models in the file (directory/models.py) to test are ...

dianakakoma commented 3 years ago

Assign it to me.

dianakakoma commented 3 years ago

Thank you, Dave.

dianakakoma commented 3 years ago

Hello Dave, I'd like to apply for a free premium Pycharm account at https://www.jetbrains.com/shop/eform/opensource. Mieko and I are working on the models testing for ChiCommons Map directory and the premium account has more assistance for Django and Flask testing. Does ChiCommons already have the PyCharm premium license? -Diana

laredotornado commented 3 years ago

Hi, Thanks for your hard work on this! I don't think they do. I asked a question just now on the watercooler channel of the ChiHackNight space (I don't have permissions to post to the general channel). We'll see if anyone comes back with anything, but for now, we should probably assume we don't have access to this.

On Sun, Apr 4, 2021 at 9:24 PM Diana Kakoma @.***> wrote:

Hello Dave, I'm like to apply for a free premium Pycharm account at https://www.jetbrains.com/shop/eform/opensource. Mieko and I are working on the models testing for ChiCommons Map directory and the premium account has more assistance for Django and Flask testing. Does ChiCommons already have the PyCharm premium license? -Diana

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/chicommons/maps/issues/41#issuecomment-813146963, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADRHTSK4AOJX3RFUQJEEULTTHENMNANCNFSM4VZPDEEQ .

dianakakoma commented 3 years ago

You're welcome. Thanks for looking into it. -Diana

On Mon, Apr 5, 2021, 10:46 AM Dave Alvarado @.***> wrote:

Hi, Thanks for your hard work on this! I don't think they do. I asked a question just now on the watercooler channel of the ChiHackNight space (I don't have permissions to post to the general channel). We'll see if anyone comes back with anything, but for now, we should probably assume we don't have access to this.

On Sun, Apr 4, 2021 at 9:24 PM Diana Kakoma @.***> wrote:

Hello Dave, I'm like to apply for a free premium Pycharm account at https://www.jetbrains.com/shop/eform/opensource. Mieko and I are working on the models testing for ChiCommons Map directory and the premium account has more assistance for Django and Flask testing. Does ChiCommons already have the PyCharm premium license? -Diana

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/chicommons/maps/issues/41#issuecomment-813146963, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ADRHTSK4AOJX3RFUQJEEULTTHENMNANCNFSM4VZPDEEQ

.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/chicommons/maps/issues/41#issuecomment-813463568, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANTF7WONZVBHO3VAVC6ZDUTTHHLNJANCNFSM4VZPDEEQ .