Re: [Wikitech-l] unit testing foreign wiki access

2012-12-13 Thread Daniel Kinzler
On 09.12.2012 00:50, Platonides wrote: Do you really need SQL access to wikidata? I would expect your code to go through a WikidataClient class, which could then connected to wikidata by sql, http, loading from a local file... Sure, but then I can't tests the code that does the direct

Re: [Wikitech-l] unit testing foreign wiki access

2012-12-09 Thread Christian Aistleitner
Hi Daniel, On Sat, Dec 08, 2012 at 10:29:23PM +0100, Daniel Kinzler wrote: On 08.12.2012 22:16, Christian Aistleitner wrote: [ database mocking ] Hm... so, if that mock DB object is used on the code, which tried to execute an SQL query against it, it will work? Yes. Sounds like that

Re: [Wikitech-l] unit testing foreign wiki access

2012-12-08 Thread Christian Aistleitner
Hi Daniel, sorry for chiming in late. But better a late response than none ;-) On Tue, Dec 04, 2012 at 10:54:08AM +0100, Daniel Kinzler wrote: [ LoadBalancer, DBAccessBase, and ORMTable integration help when developing components that access another wiki's database. ] But. How do I test

Re: [Wikitech-l] unit testing foreign wiki access

2012-12-08 Thread Daniel Kinzler
Hi Christian On 08.12.2012 22:16, Christian Aistleitner wrote: However, we actually do not need those databases and tables for testing. For testing, it would be sufficient to have mock database objects [1] that pretend that there are underlying databases, tables, etc. Hm... so, if that mock

Re: [Wikitech-l] unit testing foreign wiki access

2012-12-08 Thread Platonides
Do you really need SQL access to wikidata? I would expect your code to go through a WikidataClient class, which could then connected to wikidata by sql, http, loading from a local file... ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org

[Wikitech-l] unit testing foreign wiki access

2012-12-04 Thread Daniel Kinzler
Hi again. For the wikibase client components, we need unit tests for components that access another wiki's database - e.g. a Wikipedia would need to access Wikidata's DB to find out which data item is associated with which Wikipedia page. The LoadBalancer class has some support for this, and I