def assert_organization_date_now(name, date_type): org = Organization.objects.get(organizationtranslation__name=name) if date_type == "created": date = getattr(org, "created") elif date_type == "last edited": date = getattr(org, "last_edited") else: assert False world.assert_now(date, 60)
def assert_organization_date_now(name, date_type): org = Organization.objects.get(organizationtranslation__name=name) if date_type == "created": date = getattr(org, 'created') elif date_type == "last edited": date = getattr(org, 'last_edited') else: assert False world.assert_now(date, 60)
def i18n_last_edited_now(step, language): last_edited = datetime.strptime( world.translate_date(world.browser.find_by_css('time.last-edited').value, language), '%B %d, %Y %I:%M %p') world.assert_now(last_edited, 60)
def last_edited_now(step): last_edited = datetime.strptime(world.browser.find_by_css('time.last-edited').value, '%B %d, %Y %I:%M %p') world.assert_now(last_edited, 60)
def published_now(step): published = datetime.strptime( world.browser.find_by_css('time.published').value, '%B %d, %Y %I:%M %p') world.assert_now(published, 60)
def last_edited_now(step): last_edited = datetime.strptime( world.browser.find_by_css('time.last-edited').first.value, '%B %d, %Y %I:%M %p') world.assert_now(last_edited, 60)
def i18n_last_edited_now(step, language): last_edited = datetime.strptime( world.translate_date( world.browser.find_by_css('time.last-edited').value, language), '%B %d, %Y %I:%M %p') world.assert_now(last_edited, 60)
def published_now(step): published = datetime.strptime(world.browser.find_by_css('time.published').value, '%B %d, %Y %I:%M %p') world.assert_now(published, 60)
def project_edited_now(step, name): project = Project.objects.get(projecttranslation__name=name) world.assert_now(project.last_edited, 60)