Example #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'
Example #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'
Example #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)
Example #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())
Example #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())