Module Expr Str Assign NameStore Str Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr keyword Dict Str Str Str Str Num Str Str Str keyword Dict Str Str Str Str keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Str Str Num Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword Dict Str Str Str Str keyword NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign SubscriptStore NameLoad Index Str ListLoad AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore NameLoad Index Str Num Assign SubscriptStore NameLoad Index Str Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr keyword Dict Str Str Str Str Num Str Str Str keyword Dict Str Str Str Str keyword Dict Str Str Str Str Str Str Num Str Str Str Str Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr CompareGt AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr keyword Dict Str Str Str Num Str Str keyword Dict Str Str Str Str keyword Dict Str Str Str Str Num Str Str Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr CompareNotEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr keyword Dict Str Str AttributeLoad NameLoad attr Str keyword Dict Str Str Str Str keyword Dict Str Str AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str TryExcept body Expr Call AttributeLoad NameLoad attr keyword Dict Str Num keyword Dict Str Str Str Str keyword Dict Str AttributeLoad NameLoad attr Assert NameLoad Str handlers ExceptHandler type NameLoad name NameStore body Assert Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr keyword Dict Str Str Num Str keyword Dict Str Str Str Str keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr CompareGt AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr keyword Dict Str Str Num Str keyword Dict Str Str Str Str keyword NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr keyword Dict Str Num keyword Dict Str Str Str Str keyword Dict Str Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr keyword Dict Str Str AttributeLoad NameLoad attr Str keyword Dict Str Str Str Str keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad Str Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpLShift Num Num NameLoad Assert NameLoad Str handlers ExceptHandler type NameLoad name NameStore body Pass decorator_list decorator_list
N/A N/A Tests for User data object.
 N/A __author__ spencer@emailscrubbed.com (Spencer Kimball) N/A logging N/A sys N/A time N/A unittest functools partial tornado stack_context viewfinder.backend.base util viewfinder.backend.base.testing async_test viewfinder.backend.db.schema Location viewfinder.backend.db device viewpoint viewfinder.backend.db.user User base_test DBBaseTestCase UserTestCase N/A DBBaseTestCase N/A _CreateDefaultUser N/A N/A self N/A N/A N/A N/A N/A self _CreateUserAndDevice user_dict N/A user_id given_name family_name email 4 Spencer Kimball spencer@emailscrubbed.com ident_dict N/A key authority Email:spencer@emailscrubbed.com Test device_dict None N/A testPartialCreate N/A N/A self N/A N/A N/A Creates a user with just a given name. N/A user_dict N/A user_id given_name 5 Spencer N/A N/A user device N/A N/A self _CreateUserAndDevice user_dict user_dict ident_dict N/A key authority Email:spencer.kimball@foo.com Test device_dict None N/A N/A user _version None N/A N/A user signing_key None N/A N/A user_dict N/A labels N/A N/A User REGISTERED N/A N/A user_dict N/A email spencer.kimball@foo.com N/A N/A user_dict N/A private_vp_id v-k- N/A N/A user_dict N/A webapp_dev_id 3 N/A N/A user_dict N/A asset_id_seq 1 N/A N/A N/A self assertEqual N/A N/A user _asdict user_dict N/A testRegister N/A N/A self N/A N/A N/A Creates a user via an OAUTH user dictionary. N/A N/A u dev N/A N/A self _CreateUserAndDevice user_dict N/A user_id given_name family_name locale 4 Spencer Kimball en:US ident_dict N/A key authority Local:0_0.1 Test device_dict N/A device_id version os platform country language 20 alpha-1.0 iOS 5.0.1 iPhone 4S US en N/A N/A N/A self assertEqual N/A u given_name Spencer N/A N/A N/A self assertEqual N/A u family_name Kimball N/A N/A N/A self assertEqual N/A u locale en:US N/A N/A N/A self assertTrue N/A N/A dev device_id 0 N/A N/A N/A self assertTrue N/A dev version alpha-1.0 N/A N/A N/A self assertTrue N/A dev os iOS 5.0.1 N/A N/A N/A self assertTrue N/A dev platform iPhone 4S N/A N/A N/A self assertTrue N/A dev country US N/A N/A N/A self assertTrue N/A dev language en N/A N/A u2 dev2 N/A N/A self _CreateUserAndDevice user_dict N/A user_id given_name email 4 Brian spencer@emailscrubbed.com ident_dict N/A key authority Local:0_0.1 Test device_dict N/A device_id version os platform 21 alpha-1.0 Android 4.0.3 Samsung Galaxy S N/A N/A N/A self assertEqual N/A u user_id N/A u2 user_id N/A N/A N/A self assertEqual N/A u2 given_name Spencer N/A N/A N/A self assertEqual N/A u2 email spencer@emailscrubbed.com N/A N/A N/A self assertTrue N/A N/A dev device_id N/A dev2 device_id N/A N/A N/A self assertEqual N/A dev2 version alpha-1.0 N/A N/A N/A self assertEqual N/A dev2 os Android 4.0.3 N/A N/A N/A self assertEqual N/A dev2 platform Samsung Galaxy S N/A N/A u3 dev3 N/A N/A self _CreateUserAndDevice user_dict N/A user_id link N/A u2 user_id http://www.goviewfinder.com ident_dict N/A key authority Local:0_0.2 Test device_dict N/A device_id version N/A dev device_id alpha-1.2 N/A N/A N/A self assertEqual N/A u user_id N/A u3 user_id N/A N/A N/A self assertEqual N/A u3 link http://www.goviewfinder.com N/A N/A N/A self assertEqual N/A dev3 device_id N/A dev device_id N/A N/A N/A self assertEqual N/A dev3 os N/A dev os N/A N/A N/A self assertEqual N/A dev3 version alpha-1.2 N/A N/A N/A N/A N/A self _CreateUserAndDevice user_dict N/A user_id 1000 ident_dict N/A key authority Local:0_0.1 Test device_dict N/A device_id N/A dev3 device_id N/A False third identity should have failed with already-in-use N/A N/A N/A Exception N/A e N/A N/A N/A N/A N/A e message startswith the identity is already in use e N/A identities N/A N/A self _RunAsync N/A u3 QueryIdentities N/A self _client N/A keys N/A N/A i key N/A i identities N/A N/A N/A self assertTrue N/A Local:0_0.1 keys N/A N/A N/A self assertTrue N/A Local:0_0.2 keys N/A testRegisterViaWebApp N/A N/A self N/A N/A N/A Register from web application. N/A N/A u dev N/A N/A self _CreateUserAndDevice user_dict N/A user_id name 4 Spencer Kimball ident_dict N/A key authority Test:1 Test device_dict None N/A N/A N/A self assertEqual N/A u name Spencer Kimball N/A N/A N/A self assertTrue N/A N/A u webapp_dev_id 0 N/A N/A N/A self assertIsNone dev N/A testAddDevice N/A N/A self N/A N/A N/A Register with no mobile device, then add one. N/A N/A u dev N/A N/A self _CreateUserAndDevice user_dict N/A user_id name 4 Spencer Kimball ident_dict N/A key authority Local:1 Test device_dict None N/A N/A u2 dev2 N/A N/A self _CreateUserAndDevice user_dict N/A user_id 4 ident_dict N/A key authority Local:1 Test device_dict N/A device_id 30 N/A N/A N/A self assertEqual N/A u2 user_id N/A u user_id N/A N/A N/A self assertIsNone dev N/A N/A N/A self assertIsNotNone dev2 N/A testQueryUpdate N/A N/A self N/A N/A N/A Update a user. N/A N/A u d N/A N/A self _CreateDefaultUser N/A N/A u2 d2 N/A N/A self _CreateUserAndDevice user_dict N/A user_id email N/A u user_id spencer.kimball@emailscrubbed.com ident_dict N/A key authority Email:spencer@emailscrubbed.com Facebook device_dict None N/A N/A N/A self assertEqual N/A u email N/A u2 email N/A testAllocateAssetIds N/A N/A self N/A N/A N/A Verify the per-device allocation of user ids. N/A N/A N/A self _RunAsync N/A User AllocateAssetIds N/A self _client N/A N/A self _user user_id 5 N/A user N/A N/A self _RunAsync N/A User Query N/A self _client N/A N/A self _user user_id None N/A N/A N/A self assertEqual N/A user asset_id_seq 6 N/A N/A N/A self _RunAsync N/A User AllocateAssetIds N/A self _client N/A N/A self _user user_id 100 N/A user N/A N/A self _RunAsync N/A User Query N/A self _client N/A N/A self _user user_id None N/A N/A N/A self assertEqual N/A user asset_id_seq 106 N/A testPartialQuery N/A N/A self N/A N/A N/A Test query of partial row data. N/A N/A u dev N/A N/A self _CreateDefaultUser N/A u2 N/A N/A self _RunAsync N/A User Query N/A self _client N/A u user_id N/A given_name family_name N/A N/A N/A self assertEqual N/A u2 email None N/A N/A N/A self assertEqual N/A u2 given_name N/A u given_name N/A N/A N/A self assertEqual N/A u2 family_name N/A u family_name N/A testMissing N/A N/A self N/A N/A N/A Test query of a non-existent user. N/A N/A N/A N/A N/A self _RunAsync N/A User Query N/A self _client N/A 1 63 None N/A False user query should fail with missing key N/A N/A N/A Exception N/A e N/A N/A N/A N/A