Esempio n. 1
0
def test_correct_style_from_three_beers():
    tanczos_inventory = mostrecentfile.get_list_three()
    style_db = MockBreweryDBStoutTracked()

    i = Inventory(tanczos_inventory, style_db)
    values = i.get_historic_inventory()

    assert values[2].style == 'stout'
    assert values[2].name == 'GREAT LAKES OKTOBERFEST'
Esempio n. 2
0
def test_correct_style_from_one_beer():
    tanczos_inventory = mostrecentfile.get_list_one()
    style_db = MockBreweryDBStoutTracked()

    i = Inventory(tanczos_inventory, style_db)
    values = i.get_historic_inventory()

    assert values[0].style == 'stout'
    assert values[0].name == 'BELLS BEST BROWN'
Esempio n. 3
0
def initialize_inventory():
    location = FileLocation.save_location
    the_file = most_recent_file.MostRecentFile(location)
    style = style_db.StyleDB()
    inventory = Inventory(the_file, style)
    global queries
    queries = InventoryQueries(inventory)
Esempio n. 4
0
def inventory_has_proper_size_zero(size):
    tanczos_inventory = mostrecentfile.get_list_none()
    style_db = MockBreweryDBStoutTracked()

    i = Inventory(tanczos_inventory, style_db)
    assert size == len(i.get_historic_inventory())
Esempio n. 5
0
def inventory_has_proper_size_three(size):
    tanczos_inventory = MostRecentFile().get_list_three()
    style_db = MockBreweryDBStoutTracked()

    i = Inventory(tanczos_inventory, style_db)
    assert size == len(i.get_historic_inventory())