~lvh/txoauth/contrib-package

« back to all changes in this revision

Viewing changes to txoauth/contrib/test/__init__.py

  • Committer: Laurens Van Houtven
  • Date: 2010-09-02 12:06:55 UTC
  • Revision ID: lvh@laurensvh.be-20100902120655-2f13urq1x0vi95sx
Reduced test suite coupling

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
"""
4
4
from txoauth.authserver import interfaces
5
5
from txoauth.contrib.simple import SimpleCallbackURLFactory
6
 
from txoauth.test.test_authserver import (IDENTIFIER, BOGUS_IDENTIFIER, URL,
7
 
                                          urlFactory)
 
6
from txoauth.test.test_authserver import IDENTIFIER, BOGUS_IDENTIFIER, URL
8
7
 
9
8
from twisted.trial.unittest import TestCase
10
9
 
12
11
class SimpleCallbackURLFactoryTestCase(TestCase):
13
12
    def setUp(self):
14
13
        self.empty = SimpleCallbackURLFactory()
15
 
        self.withURLs = SimpleCallbackURLFactory(spam="eggs")
 
14
        self.withURLs = SimpleCallbackURLFactory(**{IDENTIFIER: URL})
16
15
 
17
16
 
18
17
    def test_interface(self):
33
32
 
34
33
 
35
34
    def test_registeredURL(self):
36
 
        self._genericFactoryTest(urlFactory, IDENTIFIER, URL)
 
35
        self._genericFactoryTest(self.wtihURLs, IDENTIFIER, URL)
37
36
 
38
37
 
39
38
    def test_missingURL(self):
40
 
        self._genericFactoryTest(urlFactory, BOGUS_IDENTIFIER, None)
 
39
        self._genericFactoryTest(self.withURLs, BOGUS_IDENTIFIER, None)