django-unittest Questions
2
Solved
How do forcibly skip a unit test in Django?
@skipif and @skipunless is all I found, but I just want to skip a test right now for debugging purposes while I get a few things straightened out.
Apc asked 8/7, 2013 at 5:8
1
Solved
If I have a test like so...
def test_home_page_returns_correct_html(self):
request = HttpRequest()
response = home_page(request)
expected_html = render_to_string('home.html', request=request)
...
Jonijonie asked 21/5, 2016 at 12:54
2
Solved
We've changed our database, using django migrations (django v1.7+).
The data that exists in the database is no longer valid.
Basically I want to test a migration by, inside a unittest, constructin...
Airflow asked 12/5, 2016 at 4:4
2
Solved
After tests execution is finished using Django's manage.py test command only number of passed tests is printed to the console.
(virtualenv) G:\Project\>python manage.py test
Creating test datab...
Ava asked 1/2, 2014 at 16:9
1
Solved
I have a gitlab-ci server that works fine and can connect with my gitlab server,Please can any one point me in the right directing on how to run my django unittest/builds using gitlab-ci runner tha...
Scotty asked 3/10, 2014 at 17:41
4
Solved
I'm playing with django 1.6 tutorial but i can't run tests.
My project (name mydjango) and app structure (name is polls) are as shown below in a virtualenv. (.nja files are just created by ninja-id...
Floccose asked 12/1, 2014 at 0:44
3
I can't seem to get sessions working. Django complains that HttpRequest objects have no attribute called 'session'. In the documentation it clearly states that if you have the middleware enabled, a...
Peres asked 31/5, 2013 at 21:2
3
Solved
I'm working on a Django project but I think this is a pure Python unittest question.
Normally, when you run tests, exceptions will be caught by the test runner and handled accordingly.
For debugg...
Mishamishaan asked 31/8, 2012 at 0:49
1
Solved
What is the PEP8 correct way for long method's name?
I have a unit test with a self-describing method:
def success_if_buying_price_item_when_participating_and_progression_is_100_percent(self...
Amoretto asked 14/11, 2013 at 17:56
1
Solved
I have a django class based view that I'm decorating. Unfortunately that decorator makes outside calls to do status checks which is outside the scope of what the unit test should do so I want to ov...
Jens asked 29/3, 2013 at 6:25
2
Solved
I'm using the Django test client, django.test.client.Client, to test some views in a Django app. In particular, I'm testing a case where the view calls a get_object_or_404 method and the object isn...
Readership asked 22/1, 2012 at 12:36
3
Solved
I have a class as
class PlaylistManager(models.Manager):
def add_playlist(self, name):
playlist = Playlist(name=name)
playlist.save()
return playlist
def get_playlist_with_id(self, id):
re...
Intelligibility asked 18/7, 2012 at 20:1
© 2022 - 2024 — McMap. All rights reserved.