KaffeeJunky123: been reading that, not yet clear to see that its calling something beyond what i explicitly call int he test
Guddu has quit
phenicie
KaffeeJunky123: I like that :) I new i was missing something. I was just looking for something cleaner and that will work, Thanks
sudomarize
i'm getting "'stylesheets/style.min.css' could not be found in the COMPRESS_ROOT '/home/user/djangoapp/static' or with staticfiles." when trying to access my application
roger_rabbit joined the channel
using nginx/gunicorn daemons. However runserver seems to work completely fine
rams3377 joined the channel
the change i made was altering my STATIC_ROOT & MEDIA_ROOT config settings to absolute paths
KaffeeJunky123
mekhami: it's just patched within the testcase you patch from
sudomarize
also fiddled around with my /static/ dir
is this a cache issue?
michalmo joined the channel
BabySuperman has quit
fnstudio has quit
mekhami
KaffeeJunky123: i know, i just.. i make a mock service = mock.Mock(spec=Service), then service.save(), and then I want to assert that service.save() calls service.deploy()
nimomo joined the channel
so i was thinking the service mock spec would know that deploy should get called
rams3377 has quit
ojdo has quit
basically i need to run my tests without hittin the AWS api
KaffeeJunky123
mekhami: no, you'll have to mock the deploy method
mekhami
when that API call is in the service.save() method
abara has quit
ah
KaffeeJunky123
oh
rams3377 joined the channel
mekhami: so, what method hits the AWS api?
mekhami
pardon KaffeeJunky123 that API call is in the deploy method which gets called by the save method
KaffeeJunky123
yeah
so you simply mock the deploy function
mekhami
okay
KaffeeJunky123
You can make it return the success code
or the error code
to check wether your save function handles it right
mekhami
i feel like this gets unwieldy now since i have to go in to each of these tests and patch the deploy function on every test
cestlavie joined the channel
citizen-stig joined the channel
rain0r joined the channel
Tomatosoup1 joined the channel
KaffeeJunky123
mekhami: well, that's the way of doing things in tests, you'll probably want to assert different things along the way
nimomo has quit
so it makes sense to patch for every testcase
mekhami
KaffeeJunky123: maybe this deploy function shouldn't go in save, heh.
KaffeeJunky123
mekhami: you can patch the method for a unittests class scope
pytony joined the channel
ojdo joined the channel
citizen-stig has quit
_macro joined the channel
kalem joined the channel
mekhami
KaffeeJunky123: hmm that makes more sense
KaffeeJunky123
django.test is awesome
I recommend searching the django and python docs when you run into trouble, it's often faster than asking on irc
Tomatosoup1
hi guys, i got a question. I want to make a webapp which will be a TO-DO list. Do you think i need more classes than one: Task ?
mekhami
KaffeeJunky123: i did, but sometimes the answer still eludes me
KaffeeJunky123
mekhami: the more time you spend on docs, the better you'll get in understanding them
doismellburning
Tomatosoup1: doubt it
KaffeeJunky123
that being said, reading a good book helps, I can really recommend two scoops of django
telex has quit
maxvi joined the channel
mekhami: it covers pretty much all the topics of developing web applications with django
optikalmouse has quit
and it points to references and nice third party libs
heyts has quit
Tomatosoup1
KaffeeJunky123: what project are you talking about ?
telex joined the channel
KaffeeJunky123
Tomatosoup1: I cannot parse your question with the context provided.
kalem has quit
Tomatosoup1
KaffeJunky123: you said that smth covers all the topics of developing web app with django: maybe you were talking about some book ?
maxvi
anybody installed django on centos 6.7 ? it has python 2.6 so I have problem with it. I installed Python 2.7 but it uses python 2.6 http://pastebin.com/YGGik7j4 how can I set /usr/local/bin/python as executable ?
KaffeeJunky123
Tomatosoup1: I was talking about "Two scoops of Django"
It's a really great book for Django beginners
tbaxter
or not-so-beginners
BabySuperman joined the channel
KaffeeJunky123
tbaxter: well, programming experience is mandatory
Tomatosoup1
actually, i prefer learing from docs
django doc is great
KaffeeJunky123
You'll have to consult the docs
Two Scoops of Django is mostly on best practises
jeadre has quit
Which isn't covered by the django docs
Tomatosoup1
i will take a look at it :)
KaffeeJunky123
actually there's a lot of no nos in the django docs