~stefanor/ibid/survive-without-core

« back to all changes in this revision

Viewing changes to ibid/test/plugins/test_core.py

  • Committer: Tarmac
  • Author(s): Stefano Rivera
  • Date: 2011-10-23 20:30:55 UTC
  • mfrom: (1031.1.37 exchange-825217)
  • Revision ID: ibid-lp-lander@rivera.za.net-20111023203055-n80azn66wh2utl1v
XE.com no longer has a nice helpful country to currency list, so we build our own, based on ISO-4127. This means many heuristics, so we include a reasonable test suite.
Author: Stefano Rivera
Merge Request: http://code.launchpad.net/~stefanor/ibid/exchange-825217/+merge/71367
Approved by: Max Rabkin
Fixes LP: #825217

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Copyright (c) 2009-2010, Jeremy Thurgood and Max Rabkin
2
2
# Released under terms of the MIT/X/Expat Licence. See COPYING for details.
3
3
 
4
 
from twisted.trial import unittest
5
 
 
 
4
import ibid
6
5
import ibid.test
7
6
from ibid.event import Event
8
7
 
9
 
class TestAddressed(unittest.TestCase):
 
8
class TestAddressed(ibid.test.TestCase):
10
9
 
11
10
    def setUp(self):
12
 
        ibid.test.set_config({
13
 
            u'botname': u'test_ibid',
14
 
            u'plugins': {
15
 
                u'testplugin': {
16
 
                    u'names': [u'test_ibid', u'bot', u'ant']
17
 
                    },
18
 
                },
19
 
            })
 
11
        super(TestAddressed, self).setUp()
 
12
        ibid.config.botname = u'test_ibid'
 
13
        ibid.config.plugins['testplugin'] = ibid.test.FakeConfig(
 
14
                {'names': [u'test_ibid', u'bot', u'ant']})
20
15
 
21
16
        from ibid.plugins import core
22
17
        self.processor = core.Addressed(u'testplugin')