<chdorner> @nick: rebased master onto my branch. now I'm getting "No module named TestCommon". I already ran `make dev` to get the new dependencies, what am I missing? (other than I'm obsiously missing a module named TestCommon)
<chdorner> weird, it looks like running `py.test` in the root directory includes python tests in node_modules as well
<chdorner> yeah, no worries. can't just run `py.test` anymore
<nick> @chdorner: right -- that's my fault -- we can probably add `node_modules` back to `norecursedirs` so that doesn't happen
<nick> you should still be able to run it
<nick> but I'd suggest using tox if possible
<chdorner> will look into tox tomorrow morning, with a cup of :coffee:
<nick> for now you should be able to just specify the module explicitly
<nick> `py.test h`
<chdorner> yeah that works
<wyan> @nick: I think you need to explicitly share the password with me, I can see no pwds yet
<wyan> oh nevermind
<chdorner> also saw that I can still use `/` instead of dots, hooray! bash completion!
<wyan> they just appeared as soon as I complained
<nick> @wyan: you're right -- I needed to add you to groups
<wyan> hi @sheetaluk ! :)
<sheetaluk> oh hey! I wasn't sure which channel would be more appropriate for first hello
castlelo1 joined the channel
<nick> Hello @sheetaluk!
<nick> Welcome!
<nick> The developers tend to hang out in here (this channel is public and mirrored to IRC), and #lounge is internal chatter.
<robertknight> Hello @sheetaluk !
<sheetaluk> hey @nick! Good to know
<sheetaluk> Hey @robertknight! nice to see you again :)
badon_ joined the channel
<lenazun> welcome @sheetaluk!
<sheetaluk> hey hey @lenazun!
Treora joined the channel
<chdorner> hello @sheetaluk!
<sheetaluk> Hi @chdorner :)
<wyan> `ngrok` is coming super handy to test this CSP thing!
<seanh> Should I be able to find this https://github.com/hypothesis/h/issues/2976 in Sentry? It looks to me as if that error message is shown by the client when the server 500s, but I tried a few searches in Sentry and not turning up anything
<seanh> Maybe you get that error from some 4xx responses from the server too
<seanh> Yeah, a 401 would also produce that error
<chdorner> nick: I'm having to duplicate a lot of the code in the migration script to make sure that the ES Annotation has the same API. The upside is that the migration script will be able to just create an ES annotation and then call the property methods + these conversions will have tests as well!
Treora has quit
<nick> @chdorner: you mean the normalisation code?
<nick> sounds about right
<chdorner> yeah
<chdorner> lots of moving code around, but quite nice once it's done
<seanh> Ok, why isn't this working? https://gist.github.com/seanh/9339459937946ec80141 The `activate()` method does work (`session.delete(self.activation)` deletes the activation), just not when run by this test (the `assert` fails because `user.activation` is still an `Activation` object)
Treora joined the channel
<seanh> If I step through the tests in the debugger, and simultaneously open the test db in psql, then it appears as if nothing is ever written to the db, even after adding the user and activation and calling commit. Inspecting the `db` object that the tests have in pdb though, it does seem to be a scoped session with an engine pointing at the postgresql test db
<seanh> Ok, so `activation._sa_instance_state.deleted` is `True` but (even after `flush()`) `user.activation` is still `activation` and not `None`. This is true both in tests and in dev. Presumably in dev it _is_ `None` on the next request, otherwise activating wouldn't work, and it does work
<seanh> I thought sqla was supposed to be update the Python objects on both end of a backref when things changed, but apparently not in this case
<nick> @seanh: ah, that's a bug in the test setup
<seanh> I was looking at the test setup, but couldn't spot it
<nick> basically the problem is that we can't commit inside test functions, as that breaks the savepoint/rollback thing we have going on
<nick> so we've aliased `commit` to `flush`
<nick> but we should probably alias `commit` to `flush(); expire_all()`
<nick> because the problem you're running into there is that the persistence state of the user object isn't being expired, as it would be usually when you call commit