Esempio n. 1
0
def delete_pictures(scenario):

    reset_documents(Picture, PictureManager.get_last_pictures)
    reset_documents(Picture, PictureManager.get_last_pictures, db2)

    reset_documents(Activity, ActivityManager.get_all)
    reset_documents(Activity, ActivityManager.get_all, db2)
Esempio n. 2
0
def delete_posts(scenario):
    
    reset_documents(MicroPost, MicroPostManager.get_list)
    reset_documents(MicroPost, MicroPostManager.get_list, db2)

    reset_documents(Activity, ActivityManager.get_all)
    reset_documents(Activity, ActivityManager.get_all, db2)
Esempio n. 3
0
def delete_commons(scenario):

    reset_documents(Common, CommonManager.get_last_commons)
    reset_documents(Common, CommonManager.get_last_commons, db2)

    reset_documents(Activity, ActivityManager.get_all)
    reset_documents(Activity, ActivityManager.get_all, db2)
Esempio n. 4
0
def delete_commons(scenario):

    reset_documents(Common, CommonManager.get_last_commons)
    reset_documents(Common, CommonManager.get_last_commons, db2)

    reset_documents(Activity, ActivityManager.get_all)
    reset_documents(Activity, ActivityManager.get_all, db2)
Esempio n. 5
0
def delete_pictures(scenario):

    reset_documents(Picture, PictureManager.get_last_pictures)
    reset_documents(Picture, PictureManager.get_last_pictures, db2)

    reset_documents(Activity, ActivityManager.get_all)
    reset_documents(Activity, ActivityManager.get_all, db2)
Esempio n. 6
0
def set_default_user():
    reset_documents(Contact, ContactManager.getContacts)
    reset_documents(Contact, ContactManager.getContacts, db2)

    world.browser.set_default_user()
    world.user = world.browser.user
    world.browser2.set_default_user_2(SECOND_NEWEBE_ROOT_URL)
    world.browser.login("password")
    world.browser2.login("password")
    
    world.browser.post("contacts/",
                       body='{"url":"%s"}' % world.browser2.root_url)
    time.sleep(0.3)
    world.browser2.put("contacts/%s/" % slugify(world.browser.root_url.decode("utf-8")), "")
Esempio n. 7
0
def set_default_user():
    reset_documents(Contact, ContactManager.getContacts)
    reset_documents(Contact, ContactManager.getContacts, db2)

    world.browser.set_default_user()
    world.user = world.browser.user
    world.browser2.set_default_user_2(SECOND_NEWEBE_ROOT_URL)
    world.browser.login("password")
    world.browser2.login("password")

    world.browser.post("contacts/all/",
                       body='{"url":"%s"}' % world.browser2.root_url)
    time.sleep(0.3)
    world.browser2.put(
        "contacts/%s/" % slugify(world.browser.root_url.decode("utf-8")), "")
Esempio n. 8
0
def set_browers():

    reset_documents(Contact, ContactManager.getContacts)
    reset_documents(Contact, ContactManager.getContacts, db2)

    world.browser = NewebeClient()
    world.browser.set_default_user()
    world.browser.login("password")

    try:
        world.browser2 = NewebeClient()
        world.browser2.set_default_user_2(SECOND_NEWEBE_ROOT_URL)
        world.user2 = world.browser2.user
        world.browser2.login("password")

    except HTTPError:
        print "[WARNING] Second newebe instance does not look started"
Esempio n. 9
0
def set_browers():
    reset_documents(Contact, ContactManager.getContacts)
    reset_documents(Contact, ContactManager.getContacts, db2)

    world.browser = NewebeClient()
    world.browser.set_default_user()
    world.browser.login("password")

    try:
        world.browser2 = NewebeClient()
        world.browser2.set_default_user_2(SECOND_NEWEBE_ROOT_URL)
        world.user2 = world.browser2.user
        world.browser2.login("password")

        world.browser.post("contacts/all/",
                       body='{"url":"%s"}' % world.browser2.root_url)
        time.sleep(0.3)
        world.browser2.put("contacts/%s/" % slugify(world.browser.root_url.decode("utf-8")), "")
    except HTTPError:
        print "[WARNING] Second newebe instance does not look started"
Esempio n. 10
0
def set_browers():
    reset_documents(Contact, ContactManager.getContacts)
    reset_documents(Contact, ContactManager.getContacts, db2)

    world.browser = NewebeClient()
    world.browser.set_default_user()
    world.browser.login("password")

    try:
        world.browser2 = NewebeClient()
        world.browser2.set_default_user_2(SECOND_NEWEBE_ROOT_URL)
        world.user2 = world.browser2.user
        world.browser2.login("password")

        world.browser.post("contacts/",
                           body='{"url":"%s"}' % world.browser2.root_url)
        time.sleep(0.3)
        world.browser2.put(
            "contacts/%s" % slugify(world.browser.root_url.decode("utf-8")),
            '{"state":"Trusted"}')
    except HTTPError:
        print "[WARNING] Second newebe instance does not look started"
Esempio n. 11
0
def set_browers():

    reset_documents(Contact, ContactManager.getContacts)
    reset_documents(Contact, ContactManager.getContacts, db2)
    reset_documents(ContactTag, ContactManager.getTags)

    world.browser = NewebeClient()
    world.browser.set_default_user()
    world.browser.login("password")

    try:
        world.browser2 = NewebeClient()
        world.browser2.set_default_user_2(SECOND_NEWEBE_ROOT_URL)
        world.user2 = world.browser2.user
        world.browser2.login("password")

    except HTTPError:
        print "[WARNING] Second newebe instance does not look started"
Esempio n. 12
0
def delete_all_posts(scenario):
    reset_documents(MicroPost, MicroPostManager.get_list)
    reset_documents(MicroPost, MicroPostManager.get_list, db2)
Esempio n. 13
0
def delete_all_commons(scenario):
    reset_documents(Picture, CommonManager.get_last_commons)
    reset_documents(Picture, CommonManager.get_last_commons, db2)
Esempio n. 14
0
def clear_contacts(step):
    reset_documents(Contact, ContactManager.getContacts)
    reset_documents(Contact, ContactManager.getContacts, db2)
Esempio n. 15
0
def delete_posts(scenario):
    reset_documents(MicroPost, MicroPostManager.get_list)
Esempio n. 16
0
def deletes_contacts(step):
    reset_documents(Contact, ContactManager.getContacts)
    reset_documents(Contact, ContactManager.getContacts, db2)
Esempio n. 17
0
def delete_all_pictures(scenario):
    reset_documents(Picture, PictureManager.get_last_pictures)
    reset_documents(Picture, PictureManager.get_last_pictures, db2)
Esempio n. 18
0
def delete_all_pictures(scenario):
    reset_documents(Picture, PictureManager.get_last_pictures)
    reset_documents(Picture, PictureManager.get_last_pictures, db2)
Esempio n. 19
0
def clear_contacts(step):
    reset_documents(Contact, ContactManager.getContacts)
    reset_documents(Contact, ContactManager.getContacts, db2)
Esempio n. 20
0
def delete_posts(scenario):
    reset_documents(MicroPost, MicroPostManager.get_list)
    reset_documents(MicroPost, MicroPostManager.get_list, db2)

    reset_documents(Activity, ActivityManager.get_all)
    reset_documents(Activity, ActivityManager.get_all, db2)
Esempio n. 21
0
def deletes_contacts(step):
    reset_documents(Contact, ContactManager.getContacts)
    reset_documents(Contact, ContactManager.getContacts, db2)
Esempio n. 22
0
def delete_all_commons(scenario):
    reset_documents(Picture, CommonManager.get_last_commons)
    reset_documents(Picture, CommonManager.get_last_commons, db2)