def setUp(self): self.lib_fn = r'v:\workspace\PersistentStorage\src\lib.shelve' self.lib = library.Library(self.lib_fn) self.fixture_author1 = library.Author('Octavia', 'Estelle', 'Butler') self.fixture_book1 = library.Book('0807083100', 'Kindred', [self.fixture_author1]) self.fixture_author2 = library.Author('Robert', 'Anson', 'Heinlein') self.fixture_book2 = library.Book('0441790348', 'Stranger in a Strange Land', [self.fixture_author2]) self.lib.add(self.fixture_book1) self.lib.add(self.fixture_book2)
def setUp(self): self.lib_fn = r'/Users/chris/Documents/dev/oreilly/python/python2/lib' \ r'.shelve' self.lib = library.Library(self.lib_fn) self.fixture_author1 = library.Author('Octavia', 'Estelle', 'Butler') self.fixture_book1 = library.Book('0807083100', 'Kindred', [self.fixture_author1]) self.fixture_author2 = library.Author('Robert', 'Anson', 'Heinlein') self.fixture_book2 = library.Book('0441790348', 'Stranger in a ' 'Strange Land', [self.fixture_author2]) self.lib.add(self.fixture_book1) self.lib.add(self.fixture_book2)
def setUp(self): self.lib_fn = "/Users/Fadel/Dropbox/python/Code/Python2/05-PersistentStorage/LibraryExample/lib.shelve" self.lib = library.Library(self.lib_fn) self.fixture_author1 = library.Author("Octavia", "Estelle", "Butler") self.fixture_book1 = library.Book("0807083100", "Kindred", [self.fixture_author1]) self.fixture_author2 = library.Author("Robert‰a", "Anson", "Heinlein") self.fixture_book2 = library.Book("0441709348", "Stranger in a Strange Land", [self.fixture_author2]) self.lib.add(self.fixture_book1) self.lib.add(self.fixture_book2)