Exemplo n.º 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()
Exemplo n.º 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()
Exemplo n.º 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()
Exemplo n.º 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()
Exemplo n.º 5
0
def when_i_get_last_commons(step):
    world.commons = CommonManager.get_last_commons().all()
Exemplo n.º 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()
Exemplo n.º 7
0
def when_i_get_commons_until_november_2(step):
    world.commons = CommonManager.get_last_commons(
            "2011-11-02T23:59:00Z").all()
Exemplo n.º 8
0
def when_i_get_last_commons(step):
    world.commons = CommonManager.get_last_commons().all()
Exemplo n.º 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()
Exemplo n.º 10
0
def when_i_get_commons_until_november_2(step):
    world.commons = CommonManager.get_last_commons(
        "2011-11-02T23:59:00Z").all()