kezabelle: Like I said, I got no error in the test with the request, I got status 200 but the content had not been rendered, that happened with the same view manually
anddam
FunkyBob: it could be I need inline formset, I have to check the inline part in docs tho', give me a few minutes
kezabelle
yes and I just told you why you got no error
anddam
thanks for the link
harmaahylje
FunkyBob: alright, I might as well try that, thanks
kezabelle
get_success_url() is never going to be called in your test, because you're not hitting form_valid so your .post() call isn't correct to test that the exception is raised
rpd_ joined the channel
Lynoure
kezabelle: if the posted data is incorrect, I was hoping to see it in response.content
kezabelle
then render the content and check it, or check the context_data
FunkyBob
Lynoure: well, that depends on yur template
jas02 joined the channel
kezabelle
also that, but I've presumed you have error notifications in your template :o)
Lynoure
kezabelle: ah, when test with the view directly, I need to render the content on test side? That was then what I was missing
bigblind joined the channel
FunkyBob
or check the context data
but the response code is enough to know it wasn't accepted, since otherwise it would redirect you
Lynoure
kezabelle, Funky: Thank you both, sorry I got onto your nerves :(
kezabelle
you didn't get on mine; I can't speak for that one ;)
FunkyBob
nah
kezabelle
we tend towards asking for code + traceback + "wtf you actually want to do" because its much easier to describe the actual problem when you know what is actually being inferred :)
FunkyBob
but any time you join a channel, it pays to read the topic :)
kezabelle
i.e: you thought the problem was X, but we almost know for certain its Y, but we need to see Some Code or Error to tell you it's not X :)
Lynoure
I thought my problem was me using direct view testing wrong
but I linked things wrong in my head
bigblind has quit
jarshwah joined the channel
kezabelle
indeed, and thats why we immediately ask for data point :)
wuu joined the channel
h-chauhan_ has quit
Catatronic joined the channel
vdamewood joined the channel
jarshwah has quit
xliiv has quit
bigblind joined the channel
greg_f has quit
jas02 joined the channel
alrondo joined the channel
bigblind has quit
FunkyBob
so
who wants easily nestable auth mixins?
wuu has quit
chasonchaffin has quit
bigblind joined the channel
Lynoure
Surprisingly me not, I'm happy enough with UserPassesTestMixin
FunkyBob
I was going to extend that a little
greg_f joined the channel
Lynoure
I am curious, I give you that
FunkyBob
basically taking advantage of (a) the ability to walk up the inheritance chain, (b) the ability to get the class name, and (c) the little known feature of __foo attributes
kezabelle
name mangling? ewww you're dirty :p
bigblind has quit
FunkyBob
kezabelle: :P
Lynoure
What kind of use cases are you looking to serve with it?
grelek has quit
FunkyBob
Lynoure: someone earlier was trying to stack userpassestest