def test_set_method(self): obj = Auth() legit_methods = (u'user', u'agent', u'transform') for lm in legit_methods: obj.set_method(lm) not_legit_methods = ('blah', 123, {'user': None}, list('user'), None) for nlm in not_legit_methods: assert_raises(Exception, obj.set_status, nlm)
def test_get_method(self): obj = Auth() obj.set_method(u'user') assert_equal(obj.get_method(), u'user')