Best Python code snippet using autotest_python
app.py
Source:app.py
...4from oscar.core.application import Application5from oscar.core.loading import get_class6class CustomerApplication(Application):7 name = 'customer'8 summary_view = get_class('customer.views', 'AccountSummaryView')9 order_history_view = get_class('customer.views', 'OrderHistoryView')10 order_detail_view = get_class('customer.views', 'OrderDetailView')11 anon_order_detail_view = get_class('customer.views',12 'AnonymousOrderDetailView')13 order_line_view = get_class('customer.views', 'OrderLineView')14 address_list_view = get_class('customer.views', 'AddressListView')15 address_create_view = get_class('customer.views', 'AddressCreateView')16 address_update_view = get_class('customer.views', 'AddressUpdateView')17 address_delete_view = get_class('customer.views', 'AddressDeleteView')18 address_change_status_view = get_class('customer.views',19 'AddressChangeStatusView')20 email_list_view = get_class('customer.views', 'EmailHistoryView')21 email_detail_view = get_class('customer.views', 'EmailDetailView')22 login_view = get_class('customer.views', 'AccountAuthView')23 logout_view = get_class('customer.views', 'LogoutView')24 register_view = get_class('customer.views', 'AccountRegistrationView')25 profile_view = get_class('customer.views', 'ProfileView')26 profile_update_view = get_class('customer.views', 'ProfileUpdateView')27 profile_delete_view = get_class('customer.views', 'ProfileDeleteView')28 change_password_view = get_class('customer.views', 'ChangePasswordView')29 notification_inbox_view = get_class('customer.notifications.views',30 'InboxView')31 notification_archive_view = get_class('customer.notifications.views',32 'ArchiveView')33 notification_update_view = get_class('customer.notifications.views',34 'UpdateView')35 notification_detail_view = get_class('customer.notifications.views',36 'DetailView')37 alert_list_view = get_class('customer.alerts.views',38 'ProductAlertListView')39 alert_create_view = get_class('customer.alerts.views',40 'ProductAlertCreateView')41 alert_confirm_view = get_class('customer.alerts.views',42 'ProductAlertConfirmView')43 alert_cancel_view = get_class('customer.alerts.views',44 'ProductAlertCancelView')45 wishlists_add_product_view = get_class('customer.wishlists.views',46 'WishListAddProduct')47 wishlists_list_view = get_class('customer.wishlists.views',48 'WishListListView')49 wishlists_detail_view = get_class('customer.wishlists.views',50 'WishListDetailView')51 wishlists_create_view = get_class('customer.wishlists.views',52 'WishListCreateView')53 wishlists_create_with_product_view = get_class('customer.wishlists.views',54 'WishListCreateView')55 wishlists_update_view = get_class('customer.wishlists.views',56 'WishListUpdateView')57 wishlists_delete_view = get_class('customer.wishlists.views',58 'WishListDeleteView')59 wishlists_remove_product_view = get_class('customer.wishlists.views',60 'WishListRemoveProduct')61 wishlists_move_product_to_another_view = get_class(62 'customer.wishlists.views', 'WishListMoveProductToAnotherWishList')63 def get_urls(self):64 urls = [65 # Login, logout and register doesn't require login66 url(r'^login/$', self.login_view.as_view(), name='login'),67 url(r'^logout/$', self.logout_view.as_view(), name='logout'),68 url(r'^register/$', self.register_view.as_view(), name='register'),69 url(r'^$', login_required(self.summary_view.as_view()),70 name='summary'),71 url(r'^change-password/$',72 login_required(self.change_password_view.as_view()),73 name='change-password'),74 # Profile75 url(r'^profile/$',...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!