vault19 / django-courses

Simple Django to manage courses
MIT License
6 stars 5 forks source link

#33 #38

Closed xhnilic3 closed 3 years ago

xhnilic3 commented 3 years ago

33 From where I stand pipeline is working. In my point of view, it did not work because of lacking $ before {{ matrix.django-version }}. I struggled with some troubles with local settings, so I need to make a "workaround" in test_views.py (sth like if hasattr(django.conf.global_settings, "ROOT_URLCONF"):). I would need some kind of feedback on how to deal with it correctly. I experienced the same problem with SECRET_KEY. Despite the fact I have defined it in settings.py it was looking for it in global_settings.py. Do you have any hints?

xhnilic3 commented 3 years ago

You don't have to test it on your own yet, I made PR in a state of "in progress" because I wanted to ask about the settings thing. I will test it properly and then notify you, deal?

xhnilic3 commented 3 years ago

The problem with the pytest.py (local vs global settings) is, that I tried to run it locally with the same output afterward (after error during the action). Do you have ani hint? Thank you

ricco386 commented 3 years ago

I am sorry I have no idea what are you talking about... We do not have any pytest.py file. Further more we don't use pytest at all, this project has tests written in Django's build in framework... Please read through contributing.rst.

I have committed changes to fix the broken runtests.py which now uses generated test_project instead of mock settings.

There is still broken test thou. Please pull this changes to your branch. My commit is essentially fixing this issue except the test matrix... How ever I just updated the setting according point 1. of my previous comment.

I did a research how other Django apps does this and it seems a common way to do it like this.

Please make sure the test matrix is run in all supported environments.

ricco386 commented 3 years ago

I am sorry but I had to fix the tests (#45 ). If you are interested what needed to be done: https://github.com/vault19/django-courses/pull/45/files

If you are interested in tests you can have a look at #36 or #37, or do tests for anything else and I will create an issue for that.

Alternatively #34 is easy enough as well if you would like to play with admin site...