This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
yohoojp.py - Yahoo! JAPAN OpenID Connect (YConnect) backends of python-social-auth. | |
https://github.com/omab/python-social-auth | |
http://developer.yahoo.co.jp/yconnect/ | |
settings.py should include the following: | |
SOCIAL_AUTH_YAHOOJP_OIDC_KEY = '...' | |
SOCIAL_AUTH_YAHOOJP_OIDC_SECRET = '...' | |
SOCIAL_AUTH_YAHOOJP_OIDC_AUTH_EXTRA_ARGUMENTS = {'display': 'touch', 'prompt': 'login'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function get_the_khoshino($destination == null, $username == null) { | |
if ( $destination ) { | |
return 'というわけで、' . $destination . 'に向かっています'; | |
} else { | |
if (!empty($username)) { | |
return 'いやいや'.$username.'さんほどでは。'; | |
} else { | |
return 'やはりそうでしたか。なるほどですね。'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" This is a simple gist to show how to mock | |
private methods. I've got lots of questions | |
regarding this topic. Most people seems confused. | |
Hope it helps. | |
""" | |
import unittest | |
import mock |
NewerOlder