#django

/

      • jas02 joined the channel
      • Lynoure
        this is the test https://dpaste.de/TKnM , self.manager is User in management group, and self.factory is RequestFactory
      • FunkyBob
        self.assertEqual(response.status_code, 200, msg='Submitting should go smoothly')
      • a response of 200 means the data were rejected
      • kezabelle
        you're not getting form_valid
      • yeah that.
      • harmaahylje
        when providing initial data for flatpages, should I do it with fixtures or with data migrations?
      • NomadJim_ joined the channel
      • jas02 joined the channel
      • kezabelle
        if you're not getting 302, you're never going to even call the method which raises ImproperlyConfigured
      • novigradian joined the channel
      • anddam
        I'd like to let the user insert data for a model instance and one or more instances of a related one, in a "nice" way
      • where nice means something in the range of "don't use another window"
      • FunkyBob
        harmaahylje: use a data migration to load a fixture, if you like :)
      • anddam: so... you want an inline formset?
      • anddam
        is using a formset and a little js to interactively add fields a proper approach?
      • fikka joined the channel
      • FunkyBob
        anddam: yes
      • Lynoure
        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
      • jas02 joined the channel
      • scoobertron has quit
      • scoobertron joined the channel
      • Lynoure
        My main need might be to have the test(s) for the view clearly stated in one place, for easy troubleshooting/customer service
      • bigblind joined the channel
      • bigblind has quit
      • amcorreia joined the channel
      • jas02 joined the channel
      • jadajada joined the channel
      • nazarewk has quit
      • kapil___ joined the channel
      • jas02 joined the channel
      • thiras joined the channel
      • jas02 joined the channel
      • chriys joined the channel
      • chasonchaffin joined the channel
      • nix64bit has quit
      • jas02 joined the channel
      • chasonchaffin has quit
      • bigblind joined the channel
      • jas02 joined the channel
      • av_ has quit
      • lacrymology joined the channel
      • av_ joined the channel
      • andrew9184 joined the channel
      • bigblind has quit
      • valerio joined the channel
      • jas02 joined the channel
      • chasonchaffin joined the channel
      • Web dev, not django specific: as TamperData is not compatible with FF Quantum or 58, what do you use instead for tampering with requests?
      • negaduck joined the channel
      • moldy
        Lynoure: i usually use httpie to generate requests from the command line
      • Lynoure
        moldy: thanks
      • bigblind joined the channel
      • moldy
        it seems that the built-in dev tools allow this, too
      • zhalla_ has quit
      • chasonchaffin has quit
      • detseg joined the channel
      • Lynoure
        moldy: thanks again :) I think I'll stop worrying about it and check the state of the build-in tools when that version of FF hits debian stable
      • valerio has quit
      • bigblind has quit
      • blip99 joined the channel
      • Ahuj joined the channel
      • chasonchaffin joined the channel
      • anddam
        FunkyBob: are fields in ProfileManager assigned in the instance rather than class in order to prepopulate first and last name from current user?
      • bigblind joined the channel
      • btw that is an interesting blog
      • chasonchaffin has quit
      • bigblind has quit
      • pyface has quit
      • veduardo joined the channel
      • FunkyBob
        anddam: umm... wha?
      • energizer has quit
      • bigblind joined the channel
      • valerio joined the channel
      • chasonchaffin joined the channel
      • anddam: which blog are you talking about? and which post?
      • bigblind has quit
      • Debnet joined the channel
      • av_ has quit
      • av_ joined the channel
      • apetresc joined the channel
      • lobo_d_b has quit
      • carltongibson has quit
      • av_ has quit
      • carltongibson joined the channel
      • bigblind joined the channel
      • detseg has quit
      • bigblind has quit
      • anddam
        FunkyBob: the one you suggested earlier, http://whoisnicoleharris.com/2015/01/06/impleme...
      • I've browser some more recent articles as well
      • s/browser/browsed/
      • valerio has quit
      • chasonchaffin has quit
      • valerio joined the channel
      • dethos joined the channel