def reset_data(): """Reset the datastore to a known state, populated with test data.""" setup.reset_datastore() db.put( [ Authorization.create("haiti", "test_key", domain_write_permission="test.google.com"), Authorization.create("haiti", "domain_test_key", domain_write_permission="mytestdomain.com"), Authorization.create( "haiti", "reviewed_test_key", domain_write_permission="test.google.com", mark_notes_reviewed=True ), Authorization.create( "haiti", "not_allow_believed_dead_test_key", domain_write_permission="test.google.com", believed_dead_permission=False, ), Authorization.create( "haiti", "allow_believed_dead_test_key", domain_write_permission="test.google.com", believed_dead_permission=True, ), Authorization.create("haiti", "other_key", domain_write_permission="other.google.com"), Authorization.create("haiti", "read_key", read_permission=True), Authorization.create("haiti", "full_read_key", full_read_permission=True), Authorization.create("haiti", "search_key", search_permission=True), Authorization.create("haiti", "subscribe_key", subscribe_permission=True), Authorization.create("*", "global_test_key", domain_write_permission="globaltestdomain.com"), # An API key which can be used for SMS API. Authorization.create("*", "sms_key", search_permission=True, domain_write_permission="*"), ] )
def reset_data(): """Reset the datastore to a known state, populated with test data.""" setup.reset_datastore() db.put([ Authorization.create( 'haiti', 'test_key', domain_write_permission='test.google.com'), Authorization.create( 'haiti', 'domain_test_key', domain_write_permission='mytestdomain.com'), Authorization.create( 'haiti', 'reviewed_test_key', domain_write_permission='test.google.com', mark_notes_reviewed=True), Authorization.create( 'haiti', 'not_allow_believed_dead_test_key', domain_write_permission='test.google.com', believed_dead_permission=False), Authorization.create( 'haiti', 'allow_believed_dead_test_key', domain_write_permission='test.google.com', believed_dead_permission=True), Authorization.create( '*', 'global_test_key', domain_write_permission='globaltestdomain.com'), Authorization.create( 'haiti', 'other_key', domain_write_permission='other.google.com'), Authorization.create( 'haiti', 'read_key', read_permission=True), Authorization.create( 'haiti', 'full_read_key', full_read_permission=True), Authorization.create( 'haiti', 'search_key', search_permission=True), Authorization.create( 'haiti', 'subscribe_key', subscribe_permission=True), ])
def reset_data(): """Reset the datastore to a known state, populated with test data.""" setup.reset_datastore() db.put([ Authorization.create('haiti', 'test_key', domain_write_permission='test.google.com'), Authorization.create('haiti', 'domain_test_key', domain_write_permission='mytestdomain.com'), Authorization.create('haiti', 'reviewed_test_key', domain_write_permission='test.google.com', mark_notes_reviewed=True), Authorization.create('haiti', 'not_allow_believed_dead_test_key', domain_write_permission='test.google.com', believed_dead_permission=False), Authorization.create('haiti', 'allow_believed_dead_test_key', domain_write_permission='test.google.com', believed_dead_permission=True), Authorization.create('haiti', 'other_key', domain_write_permission='other.google.com'), Authorization.create('haiti', 'read_key', read_permission=True), Authorization.create('haiti', 'full_read_key', full_read_permission=True), Authorization.create('haiti', 'search_key', search_permission=True), Authorization.create('haiti', 'subscribe_key', subscribe_permission=True), Authorization.create('*', 'global_test_key', domain_write_permission='globaltestdomain.com'), # An API key which can be used for SMS API. Authorization.create('*', 'sms_key', search_permission=True, domain_write_permission='*'), ])