Created
April 24, 2012 05:07
-
-
Save calvinchengx/2476603 to your computer and use it in GitHub Desktop.
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
class PaypalFactory(factory.Factory): | |
FACTORY_FOR = Paypal | |
class BankdraftFactory(factory.Factory): | |
FACTORY_FOR = Bankdraft | |
class BanktransferFactory(factory.Factory): | |
FACTORY_FOR = Banktransfer | |
class EventFactory(factory.Factory): | |
FACTORY_FOR = Event | |
name='Foo Bar' | |
start=datetime.datetime.now() | |
address1='Marina Bay Sands' | |
address2='Marina Bay' | |
country='Singapore' | |
city='Singapore' | |
postcode='421542' | |
account_name='Mr Men' | |
account_number='12312312' | |
bank_name='HSBC' | |
paypal_email=settings.PAYPAL_RECEIVE_EMAIL | |
branch_name='Neverland' | |
bank_address='1 Shenton Way' | |
end=datetime.datetime.now() | |
is_complete=False | |
status='Draft' | |
event_acronym='' | |
display_map=True | |
merchant_name='Scooby doo' | |
tax=0.10 | |
payment_mode_paypal = factory.SubFactory(PaypalFactory) | |
payment_mode_bankdraft = factory.SubFactory(BankdraftFactory) | |
payment_mode_bankdtransfer = factory.SubFactory(BanktransferFactory) | |
event = EventFactory.create() | |
event.payment_mode.add(payment_mode_paypal) | |
event.payment_mode.add(payment_mode_bankdraft) | |
event.payment_mode.add(payment_mode_bankdtransfer) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment