def test_get_index_0_bit():
    """get_index should return None if no bits are allocated to an index"""
    nose.assert_is_none(
        sim.get_index('11111111', num_offset_bits=1, num_index_bits=0))
def test_get_index_2_bit():
    """get_index should return correct 2 index bits for an address"""
    nose.assert_equal(
        sim.get_index('11111101', num_offset_bits=1, num_index_bits=2),
        '10')