auth.test.test_registry_jwt: rm endpoints.v2 dep
This commit is contained in:
		
							parent
							
								
									7d1bbbfe19
								
							
						
					
					
						commit
						92877fa70f
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -5,7 +5,6 @@ import pytest | ||||||
| 
 | 
 | ||||||
| from app import app, instance_keys | from app import app, instance_keys | ||||||
| from auth.registry_jwt_auth import identity_from_bearer_token, InvalidJWTException | from auth.registry_jwt_auth import identity_from_bearer_token, InvalidJWTException | ||||||
| from endpoints.v2.v2auth import TOKEN_VALIDITY_LIFETIME_S |  | ||||||
| from initdb import setup_database_for_testing, finished_database_for_testing | from initdb import setup_database_for_testing, finished_database_for_testing | ||||||
| from util.morecollections import AttrDict | from util.morecollections import AttrDict | ||||||
| from util.security.registry_jwt import ANONYMOUS_SUB, build_context_and_subject | from util.security.registry_jwt import ANONYMOUS_SUB, build_context_and_subject | ||||||
|  | @ -14,6 +13,8 @@ from util.security.registry_jwt import ANONYMOUS_SUB, build_context_and_subject | ||||||
| TEST_AUDIENCE = app.config['SERVER_HOSTNAME'] | TEST_AUDIENCE = app.config['SERVER_HOSTNAME'] | ||||||
| TEST_USER = AttrDict({'username': 'joeuser'}) | TEST_USER = AttrDict({'username': 'joeuser'}) | ||||||
| MAX_SIGNED_S = 3660 | MAX_SIGNED_S = 3660 | ||||||
|  | TOKEN_VALIDITY_LIFETIME_S = 60 * 60  # 1 hour | ||||||
|  | ANONYMOUS_SUB = '(anonymous)' | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def _access(typ='repository', name='somens/somerepo', actions=None): | def _access(typ='repository', name='somens/somerepo', actions=None): | ||||||
|  |  | ||||||
		Reference in a new issue