<filename>twidder/twidder/tests/twidder_tests.py
#!/usr/bin/env python

from TwidderTester import TwidderTester
import os
import subprocess

twidder_host = "localhost"
twidder_port = "5000"
twidder_path = "/"

user1 = ["<EMAIL>",
    "<PASSWORD>",
    "John",
    "Doe",
    "Linkoping",
    "Sweden",
    "Male"
    ]

user2 = ["<EMAIL>",
    "123",
    "Ewa",
    "Goldman",
    "Stockholm",
    "Sweden",
    "Female"
    ]

# ---------------------

if __name__ == "__main__":
    # Fetch site
    tester = TwidderTester(twidder_host, twidder_port, twidder_path)

    # Sign up with two users
    tester.sign_up(user1[0], user1[1], user1[2], user1[3], user1[4], user1[5], user1[6])
    tester.sign_up(user2[0], user2[1], user2[2], user2[3], user2[4], user2[5], user2[6])

    # Sign in as user1
    tester.sign_in(user1[0], user1[1])

    # Browse to user2
    tester.browse_user(user2[0])
    # Write post to user2
    tester.write_post("You are qt!")

    # Sign out
    tester.sign_out()

<filename>twidder/twidder/tests/twidder_tests.py
#!/usr/bin/env python

from TwidderTester import TwidderTester
import os
import subprocess

twidder_host = "localhost"
twidder_port = "5000"
twidder_path = "/"

user1 = ["<EMAIL>",
    "<PASSWORD>",
    "John",
    "Doe",
    "Linkoping",
    "Sweden",
    "Male"
    ]

user2 = ["<EMAIL>",
    "123",
    "Ewa",
    "Goldman",
    "Stockholm",
    "Sweden",
    "Female"
    ]

# ---------------------

if __name__ == "__main__":
    # Fetch site
    tester = TwidderTester(twidder_host, twidder_port, twidder_path)

    # Sign up with two users
    tester.sign_up(user1[0], user1[1], user1[2], user1[3], user1[4], user1[5], user1[6])
    tester.sign_up(user2[0], user2[1], user2[2], user2[3], user2[4], user2[5], user2[6])

    # Sign in as user1
    tester.sign_in(user1[0], user1[1])

    # Browse to user2
    tester.browse_user(user2[0])
    # Write post to user2
    tester.write_post("You are qt!")

    # Sign out
    tester.sign_out()

#!/usr/bin/env python # --------------------- # Fetch site # Sign up with two users # Sign in as user1 # Browse to user2 # Write post to user2 # Sign out