'@case: asset001
@description: Create an Asset
@Test Doc: https://docs.google.com/a/aidiq.com/spreadsheet/ccc?key=0AmB3hMcgB-3idG1XNGhhRG9QWF81dUlKLXpJaFlCMFE#gid=2
@Test Wiki: http://eden.sahanafoundation.org/wiki/DeveloperGuidelines/Testing'

def test_asset001_create_asset(self):

    today = self.today()
    now = self.now()
    now_1_day = self.now_1_day()
    now_1_week = self.now_1_week()
    self.login(account='admin', nexturl='asset/asset/create')
    self.create('asset_asset', [('number', 'WS_100_17'), ('item_id', 'Blankets'), ('organisation_id', 'International    Federation    of    Red    Cross    and    Red    Crescent    Societies'), ('site_id', 'AP    Zone'), ('sn', 'WPU-4536-9381'), ('supply_org_id', 'Acme    Suppliers'), ('purchase_date', today), ('purchase_price', 8), ('purchase_currency', 'USD'), ('comments', 'Test    Asset')])
    time.sleep(1)
    self.browser.find_element_by_link_text('Set    Base    Facility/Site').click()
    self.create('asset_log', [('cond', 'Good    Condition'), ('by_person_id', 'Admin    User'), ('comments', 'Test    site')])
    time.sleep(1)
    self.browser.find_element_by_link_text('Assign    to    Facility/Site').click()
    self.create('asset_log', [('person_id', 'Yakobus    Sereno'), ('site_id', 'AP    Zone    (Office)'), ('cond', 'Good    Condition'), ('by_person_id', 'Admin    User'), ('comments', 'Test    assign')])
    time.sleep(1)
    self.browser.find_element_by_link_text('Assign    to    Person').click()
    self.create('asset_log', [('person_id', 'Margarida    Martins'), ('site_id', 'Besusu    (Facility)'), ('cond', 'Good    Condition'), ('by_person_id', 'Yakobus    Sereno'), ('comments', 'Test    assign    person')])
