Bump version
Add missing commas to setup classifiers
Correct number of records loaded by QuerySet.__getitems__()

If the requested document had not yet been loaded from the cursor, `QuerySet.__getitems__()` was loading all documents through the one *after* the requested document. These changes prevent that from happening.

`TestQuery.test___getitem__()` and `TestQuery.test___getitem___slice()` are being updated to include checks of the length of the internal document cache to make sure the right number of documents are being loaded from the cursor.

Fixes #6
Add Model.__eq__()

`Model.__eq__()` will compare the equality of two instances based on being of the same family (`isinstance()` checks), using the same database and collection, and having the same _id.

References #5
Add Model.__ne__()

`Model.__ne__()` returns the negation of `Model.__eq__()`.

References #5
Reorder Model's dunder methods

As `Model` has grown, so has its set of dunder methods. While originally all methods were implemented alphabetically--`__init__()` being the one exception--I've decided to group related methods together.

The methods are being placed into the following groups:

* String representation methods
* Attribute access methods
* Rich comparison methods
* Container methods

Closes #7
Remove inactive Python 3.1 support

Even though the Python 3.1 tests weren't active in tox, I won't ever enable them. I might as well remove the line from `tox.ini` so I don't do anything crazy later on.
Readability

The first check in `Model.__eq__()` was big and hard to read. I'm breaking it into separate checks for the sake of readability.

The unittest for the method is also being modified to make sure that all branches of this check are actually being tested.
WIP: Mock database calls

Because PyMongo handles the actual database interaction, I just need to ensure that I'm calling the PyMongo methods with the correct parameters. I plan to mock as many of these methods as possible.

Normally I wouldn't commit in the middle of a task, but I'm going to be away from my computer for a bit and I want to make sure this work doesn't get lost.

References #3
WIP: Mock database calls

Continuation of fcc3ca7

Because PyMongo handles the actual database interaction, I just need to ensure that I'm calling the PyMongo methods with the correct parameters. I plan to mock as many of these methods as possible.

Normally I wouldn't commit in the middle of a task, but I'm going to be away from my computer for a bit (yay sleep) and I want to make sure this work doesn't get lost.

References #3
WIP: Mock database calls

Continuation of fcc3ca7

Because PyMongo handles the actual database interaction, I just need to ensure that I'm calling the PyMongo methods with the correct parameters. I plan to mock as many of these methods as possible.

Normally I wouldn't commit in the middle of a task, but since that pattern has already been established for this task I've decided to continue taking periodic snapshots.

References #3
WIP: Mock database calls

Continuation of fcc3ca7

Because PyMongo handles the actual database interaction, I just need to ensure that I'm calling the PyMongo methods with the correct parameters. I plan to mock as many of these methods as possible.

Normally I wouldn't commit in the middle of a task, but since that pattern has already been established for this task I've decided to continue taking periodic snapshots. Here I'm moving `base._current_timestamp()` to `utils.current_timestamp()`. I still have to mock the `find()` tests. After that's done, I'll begin cleaning up the mocks.

In addition to the changes mentioned about, some of `base.py` is being cleaned up to be a little more consistent. This should make refactoring easier.

References #3
WIP: Mock database calls

Continuation of fcc3ca7

Because PyMongo handles the actual database interaction, I just need to ensure that I'm calling the PyMongo methods with the correct parameters. I plan to mock as many of these methods as possible.

Normally I wouldn't commit in the middle of a task, but since that pattern has already been established for this task I've decided to continue taking periodic snapshots. Here I'm introducing `contextlib.nested()` to make it easier to write multiple patches.

References #3
WIP: Mock database calls

Continuation of fcc3ca7

Because PyMongo handles the actual database interaction, I just need to ensure that I'm calling the PyMongo methods with the correct parameters. I plan to mock as many of these methods as possible.

Normally I wouldn't commit in the middle of a task, but since that pattern has already been established for this task I've decided to continue taking periodic snapshots. This completes the process of removing the database-related IO from `TestDatabase`. After the process is completed for `TestQuery` as well, I will look into removing all dependence on the database from the module.

References #3
WIP: Mock database calls

Continuation of fcc3ca7

Because PyMongo handles the actual database interaction, I just need to ensure that I'm calling the PyMongo methods with the correct parameters. I plan to mock as many of these methods as possible.

Normally I wouldn't commit in the middle of a task, but since that pattern has already been established for this task I've decided to continue taking periodic snapshots. `QuerySet._fill_to()` is the method that I've been having the most trouble figuring out how to integrate Mock into. I'm using this as a chance to make sure everything else is in place before attempting to tackle it. Some class-level stuff still needs to be addressed, but I'll take care of that everything `_fill_to()` is done.

References #3
Mock database calls

Continuation of fcc3ca7

Because PyMongo handles the actual database interaction, I just need to ensure that I'm calling the PyMongo methods with the correct parameters. I plan to mock as many of these methods as possible.

Normally I wouldn't commit in the middle of a task, but since that pattern has already been established for this task I've decided to continue taking periodic snapshots.

The issue I was having with `QuerySet._fill_to()` was the use of `next()`. It seems that even when an instance of `MagicMock` is given a spec that implements the iterator protocol (PEP 234) or implements it on its own, `next()` will raise `TypeError` saying `MagicMock object is not an iterator`. The solution for this seems to be this change to how the cursor is consuming. Instead of `next(self._cursor)` being used, `self._cursor.next()` is now being used.

I'm not 100% happy about this change, especially since it is being done to allow tests to be mocked, but it is necessary for right now. I will continue to investigate alternative implementations.

On the bright side, without all of the database IO, the tests are noticeably faster.

At this point I'm going to declare this issue complete. I'd like to do some clean up of the tests (e.g., creating `self.cursor` and `self.qs` in `TestQuery`), but the main test was to mock `Meta.db`. I've done that and then some.

Closes #3
Update field mapping in QuerySet.distinct() and QuerySet.sort()

`QuerySet.distinct()` and `QuerySet.sort()` were both originally implemented with support for `Meta.field_map`, but offered nothing in the way of the more advanced support provided by `utils.map_fields()`. Adding a call to `map_fields()` to each of these `QuerySet` methods, more robust field mapping can be used. Support for nested fields is also gained in the process.
Add additional equality checks

When testing `Model.__eq__()` and `Model.__ne__()`, if for no reason other than as a sanity check, each test should check each instance on each side of the comparison operator.

For now I'm declaring this issue closed. At some point in the future I may decide to add support for `__g*__()` and `__l*__()`, but I don't have any real use for them now.

Closes #5
Move QuerySet test class

`test_database.TestQuery` is now `test_query.TestQuerySet`.
Reorganize TestQuerySet

`TestQuerySet` now provides a cursor and two `QuerySet` instances (one with a model and one without). Instead of each test method implementing these on their own, they all now use the class-level ones, setting any additional methods or attributes they require.

`TestQuerySet` also now mocks`MongoClient` so that the tests can be run without a database.