Added hooks for post-processing
Move test directory to coursera directory

The top level directory of the repo should not be a python package
because this changes the way in which modules are imported. It is
preferable to put everything in a package named coursera.
Use nose as test runner

In python 2.6 you can only run individual test methods and not modules
or classes from the command line interface. Nose is compatible with
python 2.6 and python 3. To run all the tests, you simply run
'nosetests' from the top level directory. Fee more nice features see
https://nose.readthedocs.org/en/latest/index.html.
There is one caveat when using nose: it does not run tests in
executable files.  When adding tests, make sure you remove the execute
permission!
Add fixtures folder

Keep the fixtures and test files seperated.
Rename test_coursera.py to test_parsing.py

Tests should no be in a single file (test_coursera.py). If you want to
test specific feature, e.g. parsing, then place the tests in a
test.test_parsing module.
Use local variable

No need to make this an attribute.
Mock grab_hidden_video_url and get_video

When testing parsing, we do not want to fire many HTTP requests. This
made the test run very slow, and forced us to disable
test_parse_preview. Now we can enable it again.
Merge pull request #117 from jonasdt/fix_tests

Merge pull request from Jonas to migrage test system to nose, instead of Python's builtin.
tests: Minor PEP-8 and whitespace adjustments.
tests: Add more documentation (docstrings).
Merge branch 'master' of git://github.com/mgsk/coursera into mgsk-master

Signed-off-by: Rogério Brito <rbrito@ime.usp.br>

Conflicts:
	coursera/coursera_dl.py
cousera: Avoid using .
coursera: Add logging information for running hooks.
Clean up urls

Add CLASS_URL, AUTH_REDIRECT_URL.
Drop the email and visiting query arguments in the authentication
redirector url.
Remove unnecessary preview arguments.
Rename className to class_name

Be consistent.
Add requests dependency
Add tests that check if we can load cookies files
Add find_cookies_for_class

Instead of the global variables csrftoken and session, we are going to
store the cookies in a requests session. The function
find_cookies_for_class searches for cookies in a given cookies_file and
returns a RequestCookieJar. This jar will be given to the requests
session.
Add do_we_have_enough_cookies

This replaces the extract_session_and_csrftoken_from_cookiejar function
Add make_cookie_values

This function will be used to create the cookie header needed for the
external downloaders.