1 2014-07-03T06:41:46 *** penguinRaider
2 2014-07-03T08:06:53 *** skathpalia
3 2014-07-03T08:35:20 *** randomax
4 2014-07-03T08:39:57 *** greg_f
5 2014-07-03T08:44:01 <skathpalia> dimazest, Can you explain how exactly finalizer can be used in writing test for +tickets?
6 2014-07-03T08:45:10 <dimazest> we need to close the driver once a test is finished
7 2014-07-03T08:45:50 <dimazest> finalizer allows to execute a function after the test
8 2014-07-03T08:45:57 <dimazest> it's similar to teardown
9 2014-07-03T08:46:58 <skathpalia> So I need to add setup method again in the class TestTicketsview
10 2014-07-03T08:47:01 <skathpalia> right?
11 2014-07-03T08:47:04 <dimazest> nooo
12 2014-07-03T08:47:21 <dimazest> the whole point is that you don't need sutup and teardown methods
13 2014-07-03T08:48:13 <dimazest> see my comments
14 2014-07-03T08:49:47 <skathpalia> Ok I think I got it
15 2014-07-03T08:49:59 <skathpalia> I am making changes :)
16 2014-07-03T08:50:17 <dimazest> good, i need to go, should be back in an hour
17 2014-07-03T09:14:49 <skathpalia> dimazest, I am getting error that pytest has no attribute fixture
18 2014-07-03T09:15:14 <skathpalia> I think fixture is for latest version only
19 2014-07-03T09:29:48 *** penguinRaider
20 2014-07-03T10:10:34 <skathpalia> dimazest, I have updated the cr and now I have tried to create ticket by simple python
21 2014-07-03T10:10:58 <skathpalia> But in this fixture is not working
22 2014-07-03T10:11:45 <skathpalia> Can you please check the reason for fixture not working on my code?
23 2014-07-03T10:14:51 <randomax> ananasova, hi
24 2014-07-03T10:15:06 <randomax> ananasova, can you tell what email_unvalidated is used for
25 2014-07-03T10:15:07 <randomax> https://bitbucket.org/ajgupta93/moin-2.0/src/5099cf7b32eaf06622a1a239750e2591b25b5054/MoinMoin/user.py?at=default#cl-94
26 2014-07-03T10:35:56 <randomax> ThomasWaldmann, can you help ? ^
27 2014-07-03T11:01:10 *** randomax
28 2014-07-03T11:04:09 *** randomax
29 2014-07-03T11:20:42 <skathpalia> dimazest, according to this http://pytest.org/latest/announce/release-2.3.0.html#changes-between-2-2-4-and-2-3-0 fixture was introduced in version 2.3
30 2014-07-03T11:34:48 *** penguinRaider
31 2014-07-03T11:47:47 *** penguinRaider
32 2014-07-03T12:13:02 <dimazest> i think it's about direct scoping and parametrization
33 2014-07-03T12:13:10 <dimazest> fixtures should be there already
34 2014-07-03T12:13:23 <dimazest> yield_fixture was added later, last year to be exact
35 2014-07-03T12:15:05 <skathpalia> dimazest, I tried running that and it shows that fixture is not there
36 2014-07-03T12:15:20 <skathpalia> Can you please try it on your pc?
37 2014-07-03T12:15:24 <dimazest> could you update the cr?
38 2014-07-03T12:15:35 <skathpalia> Yeah I have updated the cr
39 2014-07-03T12:15:42 <dimazest> cool, i'll have a look
40 2014-07-03T12:16:59 <skathpalia> Also I have used simple python method to create ticket but that shows RuntimeError: working outside of application context
41 2014-07-03T12:17:43 <skathpalia> I took the reference from MoinMoin/items/_tests/test_Blog.py to create ticket items
42 2014-07-03T12:20:23 <dimazest> i see
43 2014-07-03T12:20:41 <dimazest> what is the other things to be done
44 2014-07-03T12:21:06 <dimazest> testing needs a bit more attention and it seems that it blocks you
45 2014-07-03T12:21:30 <skathpalia> yeah actually I have not much experience in testing
46 2014-07-03T12:21:53 <dimazest> that's fine, the problem is that there are many non trivial issues
47 2014-07-03T12:24:13 <skathpalia> dimazest, I am sorry for its taking more time
48 2014-07-03T12:24:27 <dimazest> no problem
49 2014-07-03T12:24:39 <dimazest> so what's next
50 2014-07-03T12:24:50 <dimazest> i'll look to the tests by myself
51 2014-07-03T12:24:55 <dimazest> and try to solve the issues
52 2014-07-03T12:25:12 <skathpalia> But if I get through this then there won't be any problem in writing some tests for ticket items
53 2014-07-03T12:25:20 <skathpalia> as there are no test for ticket items
54 2014-07-03T12:25:58 <dimazest> i'm afraid it's too much work
55 2014-07-03T12:26:24 <dimazest> it could be a whole gsoc project
56 2014-07-03T12:26:46 <skathpalia> the next part is to add 'subscribe' and 'Add quicklink' option in submit and modify view of ticket items
57 2014-07-03T12:27:06 <skathpalia> :D
58 2014-07-03T12:28:04 <dimazest> let's do this
59 2014-07-03T12:28:21 <skathpalia> Ok I am on it :)
60 2014-07-03T12:28:34 <dimazest> while i'm looking for a nice solution of how to write tests with pytest 2.2.4, so they are easily upgradable to the newer version
61 2014-07-03T12:28:46 <dimazest> you work on new functionality
62 2014-07-03T12:28:58 <skathpalia> Ok
63 2014-07-03T12:29:15 <dimazest> once we figure out a nice (or not ugly way of writing tests) you can come back to them
64 2014-07-03T12:29:28 <skathpalia> yeah sure
65 2014-07-03T12:29:40 <dimazest> good
66 2014-07-03T12:40:06 <skathpalia> dimazest, I have a doubt in the adding these features
67 2014-07-03T12:40:27 <skathpalia> Actually ticket shouldn't support rename and many other options
68 2014-07-03T12:41:42 <skathpalia> But if I simply import itemviews.html then these unnecessary options also come on ticket submit/modify page
69 2014-07-03T12:42:20 <skathpalia> so should I make a separate file(ticket_itemviews.html) for this?
70 2014-07-03T12:49:25 <dimazest> or alter the existing template
71 2014-07-03T12:51:19 <skathpalia> You mean add the necessary features directly ticket template?
72 2014-07-03T12:51:20 <skathpalia> right?
73 2014-07-03T12:53:18 *** dave_largo
74 2014-07-03T13:20:19 <skathpalia> dimazest, ^^?
75 2014-07-03T13:31:56 <skathpalia> dimazest, I tried the way you instructed but a strange thing is happened that if I try to access the ticket created in test through revid then it shows that there is no such ticket
76 2014-07-03T13:32:17 <dimazest> i see
77 2014-07-03T13:32:28 <dimazest> yes, directly into the template
78 2014-07-03T13:32:51 <skathpalia> Okay I will add it in template
79 2014-07-03T13:33:02 <dimazest> skathpalia, regarding the revid, could you update the cr, maybe the problem is in the moin code, not in the test
80 2014-07-03T13:33:09 <dimazest> or we miss something
81 2014-07-03T13:35:50 <skathpalia> Actually I have made some changes for itemviews part in the same repo clone
82 2014-07-03T13:36:01 <skathpalia> reverting those changes and updating the cr
83 2014-07-03T13:37:45 <skathpalia> dimazest, updated the cr
84 2014-07-03T13:59:16 <dimazest> i'll have a look later
85 2014-07-03T14:13:57 *** RogerHaase
86 2014-07-03T14:20:39 <randomax> RogerHaase, worked on userwise acls
87 2014-07-03T14:20:48 <randomax> going for dinner
88 2014-07-03T14:21:00 <randomax> will post a cr as as soon as i come back
89 2014-07-03T14:28:59 <dreimark> moin
90 2014-07-03T14:29:20 <RogerHaase> moin
91 2014-07-03T14:29:26 * dreimark do you plan a sprint on the weekend of EuroPython in Berlin?
92 2014-07-03T14:30:23 <dreimark> http://blog.europython.eu/post/89138570267/europython-2014-barcamp
93 2014-07-03T14:46:27 <dimazest> dreimark: unfortunately i'll attend only the first half of EP
94 2014-07-03T14:50:13 <dreimark> dimazest: I stay until Monday after, much todo. conference is quite sold out
95 2014-07-03T14:50:36 <dimazest> i got a ticket in February :)
96 2014-07-03T14:50:41 <dimazest> for a student price
97 2014-07-03T14:50:47 <dreimark> dimazest: i am involved into the barcamp, so likly no sprint for me too.
98 2014-07-03T14:53:11 *** jek_
99 2014-07-03T14:53:21 *** jek
100 2014-07-03T14:53:21 *** jek
101 2014-07-03T14:57:21 * dimazest would happily hack the tests
102 2014-07-03T14:57:33 <dimazest> to make them work on the latest pytest
103 2014-07-03T15:13:28 <randomax> RogerHaase, what is email_unvalidated supposed to do ?
104 2014-07-03T15:13:29 <randomax> https://bitbucket.org/ajgupta93/moin-2.0/src/5099cf7b32eaf06622a1a239750e2591b25b5054/MoinMoin/user.py?at=default#cl-94
105 2014-07-03T15:19:31 <RogerHaase> randomax: sorry, I don't understand that either, probably need pycharm
106 2014-07-03T15:19:47 <dimazest> do you have any ideas why moving MoinMoin/conftest.py to conftest.py (to the root directory)
107 2014-07-03T15:20:19 <dimazest> breakes pytest, so pytest_generate_tests is not executed anymore?
108 2014-07-03T16:06:44 <randomax> RogerHaase, made a view for userwise acl
109 2014-07-03T16:08:02 <randomax> used the userbrowser view to select the user
110 2014-07-03T16:08:19 <randomax> and made a fix for the traceback in this https://bitbucket.org/thomaswaldmann/moin-2.0/issue/417/traceback-accessing-http-localhost-8080
111 2014-07-03T16:09:08 <randomax> sorry fogot to add the cr https://codereview.appspot.com/101630045
112 2014-07-03T16:09:11 <randomax> :)
113 2014-07-03T16:09:16 <randomax> *forgot
114 2014-07-03T16:10:20 *** skathpalia
115 2014-07-03T16:11:48 <RogerHaase> randomax: your mentors were hoping you would describe this on your ep before coding...
116 2014-07-03T16:14:45 <randomax> i had written about the user list in the EP for this week
117 2014-07-03T16:14:51 <randomax> but that was already implemented
118 2014-07-03T16:15:03 <randomax> so i went to do the edit rights section
119 2014-07-03T16:15:14 <randomax> it is there on the EP
120 2014-07-03T16:19:28 <randomax> RogerHaase, ^
121 2014-07-03T16:20:00 <RogerHaase> randomax: saw, trying to fit patch
122 2014-07-03T16:34:30 *** skathpalia
123 2014-07-03T16:40:03 <RogerHaase> randomax: when I click on Users under Admin Menu: https://paste.thinkmo.de/6f046d53-1d76-494b-a995-0f16a4032cdb
124 2014-07-03T16:40:32 *** penguinRaider
125 2014-07-03T16:42:02 <RogerHaase> rev.name == None
126 2014-07-03T16:45:54 <randomax> RogerHaase, i dont get a traceback like that
127 2014-07-03T16:47:26 <RogerHaase> randomax: I was testing ACLs, I deleted wiki and restored, I now see report
128 2014-07-03T16:49:10 <RogerHaase> randomax: is the intent that checking/unchecking boxes will update ACLs or does this just show the state?
129 2014-07-03T16:49:59 <randomax> currently i have just implemented viewing the current acl rights..
130 2014-07-03T16:50:33 <randomax> i intend to implement changing the changing the acl rights by checking/unchecking the boxes
131 2014-07-03T16:51:04 *** skathpalia
132 2014-07-03T16:51:24 <randomax> wanted to know that whether this view is ok with you or something else needs to be done
133 2014-07-03T16:54:49 <RogerHaase> As a report, it is a useful view. But I am wondering if I have a write priv. as part of a group, and the write priv gets unchecked for a user, how you change ACL rule for item?
134 2014-07-03T16:57:50 *** penguinRaider
135 2014-07-03T16:58:18 <randomax> I was thinking about the implementation..
136 2014-07-03T16:58:30 <randomax> it is quite hard to actually do that
137 2014-07-03T16:58:51 <randomax> so if checking/unchecking gets too tuff
138 2014-07-03T16:59:18 <randomax> i plan to give the link to item acl view so that the admin can modify accordingly
139 2014-07-03T17:00:00 <randomax> and also make the checkboxes unclickable or present it in a way that it is evident that it is just a view
140 2014-07-03T17:00:58 <RogerHaase> that is what we were looking for on ep
141 2014-07-03T17:01:39 <RogerHaase> How will you be able to detect groups that are used in ACL rules
142 2014-07-03T17:03:59 <RogerHaase> I have not yet tried to use a group in an ACL rule...
143 2014-07-03T17:06:45 <randomax> finding groups is already implemented i guess
144 2014-07-03T17:07:11 <randomax> i need to look into relating them to acls
145 2014-07-03T17:14:44 <RogerHaase> randomax: there are special groups (All, Known, Trusted), but then there are groups you can just make up. In moin1.9, these were wiki pages with a list of user names
146 2014-07-03T17:17:05 <RogerHaase> here it defines Special Groups https://moin-20.readthedocs.org/en/latest/admin/configure.html?highlight=acl#acls-special-groups, but in very next section it lists 2. special groups, 3. more general groups, 4 Trusted,... (where 4, 5, 6) would seem to be part of 2. special groups
147 2014-07-03T17:20:52 <randomax> Here it shows stuff for user defined groups - https://moin-20.readthedocs.org/en/latest/admin/configure.html?highlight=acl#group-backend-configuration
148 2014-07-03T17:21:26 <randomax> but where should i add these ?
149 2014-07-03T17:21:49 <randomax> in the local config ?
150 2014-07-03T17:23:43 <RogerHaase> have you added a wikiconfig_local.py and a wikiconfig_editeme.py to your repo root?
151 2014-07-03T17:28:59 <randomax> yeah..
152 2014-07-03T17:30:00 <RogerHaase> hmm, after reading about Groups and Dicts, I am not sure that helps...
153 2014-07-03T17:32:33 *** dave_largo
154 2014-07-03T17:47:56 <randomax> RogerHaase, it keeps giving this traceback -
155 2014-07-03T17:48:00 <randomax> http://pastebin.com/jBVaD3EP
156 2014-07-03T17:48:14 <randomax> once i add the groups section in the local config file
157 2014-07-03T17:49:41 <ananasova> randomax: EMAIL_UNVALIDATED is used to set user email which is not validated yet
158 2014-07-03T17:50:02 <ananasova> on signup an email with a token should be sent to user email
159 2014-07-03T17:50:39 <ananasova> when clicking on that, email is validated
160 2014-07-03T17:51:08 <ananasova> until email is unvalidated, user can't receive any notifications on email
161 2014-07-03T17:51:36 <randomax> so till that time EMAIL is not set to anything ?
162 2014-07-03T17:52:01 <ananasova> i don't remember exactly, but it should be so
163 2014-07-03T17:52:05 <ananasova> you can check that easily
164 2014-07-03T17:53:02 <randomax> ok and the parameter "validate" if True signifies that the email needs to be validated still right ?
165 2014-07-03T17:53:25 <randomax> and same with the user_email_unique ?
166 2014-07-03T17:57:16 <ananasova> i don't know for sure, but seems so. "validate" must be a flag to enable/disable moin to check things like username, email
167 2014-07-03T17:57:28 <ananasova> mostly reading that from code
168 2014-07-03T17:58:33 <RogerHaase> randomax: I am having no success either trying to create a WikiDict. back in 30 min
169 2014-07-03T17:58:59 <randomax> ananasova, ok thanx
170 2014-07-03T17:59:08 <randomax> RogerHaase, ok
171 2014-07-03T18:16:52 *** greg_f
172 2014-07-03T18:17:04 <randomax> ThomasWaldmann, could tell how to create and use goups ?
173 2014-07-03T18:17:16 <randomax> i tried using this - https://moin-20.readthedocs.org/en/latest/admin/configure.html?highlight=acl#group-backend-configuration
174 2014-07-03T18:17:21 <randomax> in local config file
175 2014-07-03T18:17:32 <randomax> but gives this traceback - http://pastebin.com/jBVaD3EP
176 2014-07-03T18:46:57 <ThomasWaldmann> moin
177 2014-07-03T18:48:23 <RogerHaase> ThomasWaldmann: are ACLs intended to block a superuser from viewing an item?
178 2014-07-03T18:48:49 <ThomasWaldmann> randomax: did you put that definition into the Config class?
179 2014-07-03T18:49:09 <ThomasWaldmann> RogerHaase: iirc superuser is unrelated to read permission
180 2014-07-03T18:50:06 <RogerHaase> ok, then that part is working, as ACLs do block superusers
181 2014-07-03T18:50:25 <randomax> ThomasWaldmann, yes
182 2014-07-03T18:51:40 <ThomasWaldmann> randomax: I'll try it after dinner. should work and that code (IIRC) wasn't touched recently.
183 2014-07-03T18:51:56 <ThomasWaldmann> if you run py.test, do all tests work?
184 2014-07-03T18:54:31 <randomax> yes.. i have pep8 error but no pytest errors
185 2014-07-03T19:08:45 <ThomasWaldmann> ok, reproduced it
186 2014-07-03T19:13:04 <ThomasWaldmann> randomax: try just removing the request params from that config sample
187 2014-07-03T19:13:10 <RogerHaase> I also tried a WikiGroup, e.g. created an item TrustedGroup, added a list of user IDs (that would work in Moin 1.9), then created an ACL for an item: TrustedGroup:read,write,create,destroy,admin - result is no one can access item
188 2014-07-03T19:13:15 <ThomasWaldmann> at least it doesn't crash then any more
189 2014-07-03T19:16:39 <randomax> still gives another traceback on userbrowser view
190 2014-07-03T19:16:42 <randomax> http://pastebin.com/3TR9dJLU
191 2014-07-03T19:19:04 <ThomasWaldmann> btw, use the new pastebin, see url
192 2014-07-03T19:20:44 <ThomasWaldmann> some fellow gsoc student likely forgot the multiple name adaption there
193 2014-07-03T19:24:02 <ThomasWaldmann> randomax: did your work on fixing this or shall i fix it?
194 2014-07-03T19:24:10 <ThomasWaldmann> you*
195 2014-07-03T19:24:43 <randomax> i havent fixed it yet
196 2014-07-03T19:25:02 <randomax> *started
197 2014-07-03T19:26:19 <randomax> is the problem that member is itself a list so it cant be a key
198 2014-07-03T19:26:21 <randomax> ?
199 2014-07-03T19:27:36 <ThomasWaldmann> names are lists, yes
200 2014-07-03T19:27:36 <randomax> i.e rev.meta[NAME] is itself a list..
201 2014-07-03T19:27:54 <randomax> i'll try to fix it then
202 2014-07-03T19:28:30 <ThomasWaldmann> it needs to work with len 0 .. n
203 2014-07-03T19:49:07 * ThomasWaldmann fixes the groups docs
204 2014-07-03T20:03:19 <ThomasWaldmann> randomax: btw, a good convention for commit comments is:
205 2014-07-03T20:03:35 <ThomasWaldmann> first line (not too long, maybe below 80 chars)
206 2014-07-03T20:03:37 <ThomasWaldmann> empty line
207 2014-07-03T20:03:43 <ThomasWaldmann> more details here
208 2014-07-03T20:05:04 * ThomasWaldmann merged the PRs
209 2014-07-03T20:09:51 <ThomasWaldmann> randomax: btw, you are unrolling that loop for the users, right?
210 2014-07-03T20:10:15 <ThomasWaldmann> i mean, making a normal loop out of that list comprehension
211 2014-07-03T20:11:31 <randomax> yes
212 2014-07-03T20:11:37 <randomax> doing exactly that
213 2014-07-03T20:13:07 *** RogerHaase1
214 2014-07-03T20:13:59 <RogerHaase1> randomax: ThomasWaldmann: I did get the WikiGroups working... Create an item ending in Group, like TrustedGroup, then edit the metadata and add """ "usergroup": ["RogerHaase","JohnDoe"], """, then use that in an ACL rule: TrustedGroup:read,write,create,destroy,admin
215 2014-07-03T20:14:06 *** RogerHaase
216 2014-07-03T20:14:25 *** RogerHaase1
217 2014-07-03T20:26:01 <randomax> ThomasWaldmann, RogerHaase should i file a bug for that ?
218 2014-07-03T20:29:55 <RogerHaase> randomax: it "that" is your traceback, yes
219 2014-07-03T20:30:39 <randomax> yes.. ok.. i'll do that
220 2014-07-03T20:46:26 <randomax> ThomasWaldmann, cr needed for traceback occurring on accessing items which we do not permission to read - https://codereview.appspot.com/101650043/
221 2014-07-03T20:47:59 <ThomasWaldmann> don't we already have a 403 handler?
222 2014-07-03T20:50:51 <randomax> There is a function defined in themes/__init__.py - https://bitbucket.org/thomaswaldmann/moin-2.0/src/bc0f43fecbc7699157d5d981d16f527c779d7b6d/MoinMoin/themes/__init__.py?at=default#cl-56
223 2014-07-03T20:51:02 <randomax> but it does not get called
224 2014-07-03T20:52:41 <RogerHaase> randomax: you should put issue # in your cr title this is 444 https://bitbucket.org/thomaswaldmann/moin-2.0/issue/444/traceback-on-trying-to-access-item-which protecting.py is raising AccessedDenied
225 2014-07-03T20:54:13 <ThomasWaldmann> randomax: it is registered on the toplevel app as 403 handler
226 2014-07-03T20:56:50 <randomax> RogerHaase, ok..
227 2014-07-03T20:57:34 <randomax> ThomasWaldmann, yes.. i couldnt figure out why abort(403) does not call this function
228 2014-07-03T20:58:28 <ThomasWaldmann> guess we first figure it out before just adding another handler
229 2014-07-03T21:14:41 <randomax> The problem is that the same abort(403) works here - https://bitbucket.org/thomaswaldmann/moin-2.0/src/bc0f43fecbc7699157d5d981d16f527c779d7b6d/MoinMoin/security/__init__.py?at=default#cl-37
230 2014-07-03T21:15:01 <randomax> but gives a traceback here - https://bitbucket.org/thomaswaldmann/moin-2.0/src/bc0f43fecbc7699157d5d981d16f527c779d7b6d/MoinMoin/storage/middleware/protecting.py?at=default#cl-289
231 2014-07-03T21:18:09 <randomax> i'll try more to come up with something by tomorrow.. gonna sleep now.. gn
232 2014-07-03T21:19:09 *** randomax
233 2014-07-03T22:32:30 *** RogerHaase
234