Пример #1
0
def and_one_activity_for_first_common_with_one_error_for_my_contact(step):
    author = world.browser.user
    world.contact = world.browser2.user.asContact()
    world.common = CommonManager.get_last_commons().first()

    world.activity = Activity(
        author=author.name,
        verb="posts",
        docType="common",
        docId=world.common._id,
    )
    world.activity.add_error(world.contact)
    world.activity.save()
Пример #2
0
def and_i_add_one_deletion_activity_for_first_common_with_one_error(step):
    author = world.browser.user
    world.contact = world.browser2.user.asContact()
    world.common = CommonManager.get_last_commons().first()

    world.activity = Activity(author=author.name,
                              verb="deletes",
                              docType="common",
                              docId=world.common._id,
                              method="PUT")
    date = date_util.get_db_date_from_date(world.common.date)
    world.activity.add_error(world.contact, extra=date)
    world.activity.save()
Пример #3
0
def and_one_activity_for_first_common_with_one_error_for_my_contact(step):
    author = world.browser.user
    world.contact = world.browser2.user.asContact()
    world.common = CommonManager.get_last_commons().first()

    world.activity = Activity(
        author=author.name,
        verb="posts",
        docType="common",
        docId=world.common._id,
    )
    world.activity.add_error(world.contact)
    world.activity.save()
Пример #4
0
def and_i_add_one_deletion_activity_for_first_common_with_one_error(step):
    author = world.browser.user
    world.contact = world.browser2.user.asContact()
    world.common = CommonManager.get_last_commons().first()

    world.activity = Activity(
        author=author.name,
        verb="deletes",
        docType="common",
        docId=world.common._id,
        method="PUT"
    )
    date = date_util.get_db_date_from_date(world.common.date)
    world.activity.add_error(world.contact, extra=date)
    world.activity.save()
Пример #5
0
def when_i_get_last_commons(step):
    world.commons = CommonManager.get_last_commons().all()
Пример #6
0
def clear_all_commons(step):
    commons = CommonManager.get_last_commons()
    while commons:
        for common in commons:
            common.delete()
        commons = CommonManager.get_last_commons()
Пример #7
0
def when_i_get_commons_until_november_2(step):
    world.commons = CommonManager.get_last_commons(
            "2011-11-02T23:59:00Z").all()
Пример #8
0
def when_i_get_last_commons(step):
    world.commons = CommonManager.get_last_commons().all()
Пример #9
0
def clear_all_commons(step):
    commons = CommonManager.get_last_commons()
    while commons:
        for common in commons:
            common.delete()
        commons = CommonManager.get_last_commons()
Пример #10
0
def when_i_get_commons_until_november_2(step):
    world.commons = CommonManager.get_last_commons(
        "2011-11-02T23:59:00Z").all()