Пример #1
0
    def test_user_based_auth(self):
        obj = Auth()
        user_name = 'test_public'
        password = '******'
        obj.user(user_name, password)

        assert_equal(obj._public_key, user_name)
        assert_equal(obj._private_key, password)
        assert_equal(obj._auth_method, u'user')
Пример #2
0
    def test_user_based_mfa_auth(self):
        obj = Auth()
        user_name = 'test_public'
        password = '******'
        mfa = '12345678ABC!$*'
        obj.user(user_name, password, mfa)

        assert_equal(obj._public_key, user_name)
        assert_equal(obj._private_key, password)
        assert_equal(obj._mfa, mfa)
        assert_equal(obj._auth_method, u'user')
Пример #3
0
    def test_get_package(self):
        obj = Auth()
        user_name = 'test_public'
        password = '******'
        mfa = '12345678ABC!$*'
        obj.user(user_name, password, mfa)

        package = obj.get_package()

        assert_equal(package['PlaidCloud-Auth-Method'], str(u'user'))
        assert_equal(package['PlaidCloud-Key'], user_name)
        assert_equal(package['PlaidCloud-Pass'], password)
        assert_equal(package['PlaidCloud-MFA'], mfa)