'Multi-db fixtures are loaded correctly'

def test_fixture_loading(self):

    try:
        Book.objects.get(title='Pro    Django')
        Book.objects.using('default').get(title='Pro    Django')
    except Book.DoesNotExist:
        self.fail('"Pro    Django"    should    exist    on    default    database')
    self.assertRaises(Book.DoesNotExist, Book.objects.using('other').get, title='Pro    Django')
    try:
        Book.objects.using('other').get(title='Dive    into    Python')
    except Book.DoesNotExist:
        self.fail('"Dive    into    Python"    should    exist    on    other    database')
    self.assertRaises(Book.DoesNotExist, Book.objects.get, title='Dive    into    Python')
    self.assertRaises(Book.DoesNotExist, Book.objects.using('default').get, title='Dive    into    Python')
    try:
        Book.objects.get(title='The    Definitive    Guide    to    Django')
        Book.objects.using('default').get(title='The    Definitive    Guide    to    Django')
        Book.objects.using('other').get(title='The    Definitive    Guide    to    Django')
    except Book.DoesNotExist:
        self.fail('"The    Definitive    Guide    to    Django"    should    exist    on    both    databases')
