stanislas: don't test POST, that comes under /creator/
2015-12-19 35313, 2015
Gentlecat
doesn't look very hi-res :(
2015-12-19 35318, 2015
LordSputnik
(not /creator/:id)
2015-12-19 35349, 2015
stanislas
LordSputnik: why ?
2015-12-19 35357, 2015
LordSputnik
POST is for submitting a new creator entity - to test it you would do the post request with some data, and make sure the new creator existed in the database afterwards
2015-12-19 35332, 2015
stanislas
LordSputnik: But it's a part of the task
2015-12-19 35324, 2015
stanislas
LordSputnik: and PUT ?
2015-12-19 35327, 2015
LordSputnik
stanislas: No, the task only asks you to do GET, PUT and DELETE
2015-12-19 35332, 2015
LordSputnik
PUT is for updating an existing entity
2015-12-19 35347, 2015
stanislas
LordSputnik: ok, didn't see that
2015-12-19 35355, 2015
LordSputnik
Which is why it works for /creator/:id and POST doesn't (there's not BBID allocated when you make a POST request)
2015-12-19 35305, 2015
stanislas
seems logical
2015-12-19 35338, 2015
LordSputnik
So for PUT, you'd want to get an entity, and do a PUT request with some data for one field at a time, and after each PUT, check that the corresponding field in the model has been updated correctly
2015-12-19 35301, 2015
LordSputnik
(err, by "get an entity" I mean, set one up in the database, not make a GET request!)
2015-12-19 35336, 2015
stanislas
I understand
2015-12-19 35344, 2015
LordSputnik
For DELETE, you'd simply do the request and make sure the master revision for the entity has no data anymore
2015-12-19 35301, 2015
LordSputnik
(That's how deleting things in BB works)
2015-12-19 35320, 2015
LordSputnik
If we were to actually delete the entity rows, it wouldn't be possible to revert the deletion
2015-12-19 35324, 2015
stanislas
LordSputnik: To do a PUT request should I just make something like : self.client.put('something') ?
2015-12-19 35304, 2015
legoktm
Gentlecat: hm, can you use the inspector to see which image is being loaded there?
2015-12-19 35305, 2015
stanislas
LordSputnik: and what should i put there (as an argument) ?
Freso: I already submitted pull request for that branch
2015-12-19 35346, 2015
stanislas
is it something german ?
2015-12-19 35313, 2015
LordSputnik
stanislas: no it's written in English
2015-12-19 35326, 2015
LordSputnik
stanislas: That's the documentation for self.client
2015-12-19 35333, 2015
stanislas
I know it is, just funny name for a class
2015-12-19 35358, 2015
LordSputnik
You need to pass in JSON data as a string to the data parameter. You may also have to set the Content-Type header
2015-12-19 35320, 2015
LordSputnik
stanislas: yeah I don't know how the name came about. Perhaps the author is German
2015-12-19 35332, 2015
legoktm
Gentlecat: weird, okay, I'll mess with it more
2015-12-19 35332, 2015
Gentlecat
same in safari
2015-12-19 35353, 2015
stanislas
LordSputnik: And what do you think about the tests i've done so far ?
2015-12-19 35307, 2015
Freso
opatel99: Yes, I know.
2015-12-19 35318, 2015
Freso
That is how I became aware of it.
2015-12-19 35319, 2015
LordSputnik
stanislas: I've just been looking at it
2015-12-19 35327, 2015
stanislas
ok
2015-12-19 35332, 2015
LordSputnik
I would advise splitting out the major bits of testing into separate methods
2015-12-19 35339, 2015
opatel99
So... what needs to be done by me Freso
2015-12-19 35346, 2015
LordSputnik
So have one method for the core data, one for aliases, one for relationships
2015-12-19 35349, 2015
Freso
opatel99: Did you see Mineo's coment on IRC?
2015-12-19 35357, 2015
opatel99
yeah
2015-12-19 35304, 2015
Freso
So I'd do that.
2015-12-19 35337, 2015
LordSputnik
stanislas: your looping over Creator instances is a good way to test differently configured entities though - it'll be useful to set up some entities to have aliases, others to have relationships, and some to have neither and both
2015-12-19 35342, 2015
opatel99
Freso: I already submitted the branch.
2015-12-19 35354, 2015
stanislas
I've added Franz Kafka and Metamorphose but they have relationships
2015-12-19 35312, 2015
stanislas
LordSputnik: Do I have to test relationships?
2015-12-19 35338, 2015
stanislas
LordSputnik: like aliases ?
2015-12-19 35328, 2015
LordSputnik
stanislas: If you could. But only test aliases and relationships in GET (the way we create and update them is changing, so no point testing PUT/POST for those at the moment)
2015-12-19 35358, 2015
LordSputnik
stanislas: but I'd say focus on splitting the function up and adding PUT and DELETE tests before focusing too much on aliases and relationships
2015-12-19 35303, 2015
stanislas
LordSputnik: I mean there are annotations, identifiers, disambiguation too
2015-12-19 35319, 2015
LordSputnik
I'd rather have tests for just the core data for GET, PUT and DELETE than have a GET test with aliases and relationships well covered
2015-12-19 35336, 2015
Freso
opatel99: Did the task get closed?
2015-12-19 35351, 2015
opatel99
Nope
2015-12-19 35353, 2015
LordSputnik
stanislas: same for identifiers - annotations and disambiguation are fairly simple though, so I'd consider that "core"
2015-12-19 35301, 2015
opatel99
Submitted for review
2015-12-19 35308, 2015
stanislas
LordSputnik: GET has been covered already (without relationships)
MB: Include tag name on user/tag/tagname pages || 3 days || Code, User Interface || MetaBrainz Foundation
2015-12-19 35323, 2015
opatel99
Freso: We are talking about different things.
2015-12-19 35341, 2015
opatel99
Oh just got the notif
2015-12-19 35342, 2015
opatel99
Thanks!
2015-12-19 35359, 2015
Freso
;)
2015-12-19 35301, 2015
LordSputnik
stanislas: OK, so, I'd say to split test_creator_get into at least test_good_bbid, test_bad_bbid and test_aliases, then keep going with test_put and test_delete
2015-12-19 35302, 2015
Freso goes to create Picard-226 pt. 2.
2015-12-19 35304, 2015
opatel99
Freso: Perhaps my solution didnt even deserve to be part 1 and a new comer could probably solve it without my work...
2015-12-19 35324, 2015
LordSputnik
zas: how's MB OAuth for discourse doing? Would you still like me to help out?
2015-12-19 35339, 2015
zas
yes
2015-12-19 35308, 2015
LordSputnik
OK, I can put in a few hours on it, what's the current state of things?
2015-12-19 35359, 2015
zas
discourse is ready, just need to hook oauth
2015-12-19 35321, 2015
ariscop_ is now known as ariscop
2015-12-19 35311, 2015
LordSputnik
zas: OK, I think I we can do it via a plugin, I can have a go at writing some Ruby for it. Which server is this hosted on?
2015-12-19 35327, 2015
zas
cartman
2015-12-19 35351, 2015
gcibot has quit
2015-12-19 35314, 2015
zas
installed under docker, with 3 containers, one dedicated to web, one to data (postgresql), one to redis
2015-12-19 35330, 2015
LordSputnik
zas: OK, I don't have access to that yet, I think, could you set me up on there?
2015-12-19 35349, 2015
gcibot joined the channel
2015-12-19 35337, 2015
Freso
opatel99: Tell Mineo that. But bitmap already stated that he didn't think the task was suited for GCI to begin with.
2015-12-19 35354, 2015
Freso
opatel99: And you did learn a bunch of stuff trying to figure it out.
2015-12-19 35330, 2015
opatel99
Freso: True... On to new adventures now!
2015-12-19 35344, 2015
Freso
🙌
2015-12-19 35353, 2015
opatel99
LordSputnik: You think I can top stanislas plugin name with `CaliBrainz`?
2015-12-19 35358, 2015
stanislas
opatel99 : You mean to change CaliBBre to CaliBrainz ?
2015-12-19 35327, 2015
LordSputnik
opatel99: hehe, I'm not too worried about the name at this point, if you make a plugin with cool features, you may be able to do better than stanislas, but it'd be a challenge ;)
2015-12-19 35301, 2015
stanislas
It would, I am still working on this plugin :)
2015-12-19 35346, 2015
opatel99
I am thinking of putting that on backburner for me. I want to try out the other Brainz and other prog styles than just Python by now. Maybe some JS.
CB: Add indication of review language || 3 days || Code, User Interface || MetaBrainz Foundation
2015-12-19 35348, 2015
LordSputnik
opatel99: BB has 6 JS tasks
2015-12-19 35350, 2015
LordSputnik
zas: I'm going to set up Discourse locally for now, get it working with MB OAuth, then we can try it out on your configured instance
2015-12-19 35353, 2015
opatel99
LordSputnik: I will start on the theme task.
2015-12-19 35302, 2015
zas
ok
2015-12-19 35313, 2015
LordSputnik
opatel99: OK, but that one probably doesn't have a huge amount of JS in
2015-12-19 35352, 2015
opatel99
LordSputnik: I can play around with the file structure to start ;)
2015-12-19 35302, 2015
opatel99
Two birds, 1 task
2015-12-19 35312, 2015
stanislas
opatel99: before you write the plugin, backup your books somewhere else. I've only Harry Potters, Golden Compasses and 'STH's in my calibre library :)
2015-12-19 35355, 2015
stanislas
(after testing the plugin on my library)
2015-12-19 35332, 2015
opatel99
stanislas: thanks! I do have quite a few entries in Calibre
2015-12-19 35324, 2015
triggerwarning joined the channel
2015-12-19 35335, 2015
IGLC joined the channel
2015-12-19 35335, 2015
dcentral joined the channel
2015-12-19 35327, 2015
stanislas
Leftmost, LordSputnik: I am getting 301 error, when trying to : relationships_response = self.client.get('/entity/{}/relationships'.format(creator_gid))
2015-12-19 35341, 2015
opatel99
LordSputnik: What pages would you like to see for the Flatly test before custom styling?
2015-12-19 35313, 2015
IGLC has quit
2015-12-19 35343, 2015
opatel99
Is GCi upload working?
2015-12-19 35301, 2015
LordSputnik
stanislas: hmm, you'll probably have to authenticate
2015-12-19 35341, 2015
stanislas
LordSputnik: But it is working on the website
2015-12-19 35348, 2015
LordSputnik
stanislas: To do that, you'll need to set up an OAuthClient in the test fixtures, and link it to a user. Then send a POST request to the authentication endpoint with client_id, grant_type, username and password
2015-12-19 35327, 2015
stanislas
Why is it working on the website (without authentication) and not here ?
2015-12-19 35341, 2015
LordSputnik
Ohh, you're using GET
2015-12-19 35356, 2015
LordSputnik
Ignore what I said then, let me have a think for a sec
2015-12-19 35316, 2015
LordSputnik
(also 401 is Unaothorised, not 301!)
2015-12-19 35332, 2015
LordSputnik
301 is a redirect. try adding a trailing slash
2015-12-19 35315, 2015
stanislas
another one ?
2015-12-19 35339, 2015
stanislas
LordSputnik: I have one already in relationships_response = self.client.get('/entity/{}/relationships'.format(creator_gid))
2015-12-19 35343, 2015
stanislas
ok, misunderstood
2015-12-19 35349, 2015
stanislas
LordSputnik: It works now
2015-12-19 35357, 2015
stanislas
thanks
2015-12-19 35305, 2015
LordSputnik
Good to hear :)
2015-12-19 35324, 2015
stanislas
LordSputnik: But when trying to delete, I got 401 so your previous thoughts may be helpful now
2015-12-19 35352, 2015
Leftmost
DELETE will require that you authenticate.
2015-12-19 35331, 2015
stanislas
How to set up an OAuthClient ?
2015-12-19 35308, 2015
stanislas
is it OAuth or OAuth2 ?
2015-12-19 35310, 2015
opatel99
Leftmost: I submitted the flatly before custom styling pictures to the GCi page.
2015-12-19 35313, 2015
opatel99
OAUTH2
2015-12-19 35305, 2015
dcentral has quit
2015-12-19 35308, 2015
LordSputnik
stanislas: It's OAuth2 - you'll want to set up the client_id field - the others can probably be left as default
2015-12-19 35315, 2015
triggerwarning has quit
2015-12-19 35352, 2015
LordSputnik
opatel99: Those screenshots look quite good with flatly :) how did you get them? manually go to each page, or is there a tool that can do it?
2015-12-19 35324, 2015
opatel99
LordSputnik: I wrote a little script that went to the urls and fetched a screenshot.
2015-12-19 35342, 2015
opatel99
I thought 15 minutes writing that would be easier than doing it manually two or three times..
2015-12-19 35353, 2015
LordSputnik
opatel99: wonderful :)
2015-12-19 35323, 2015
opatel99
LordSputnik: Here is what I have for the custom so far