'Test single- and multi-asset queries on static restrictions'

def test_static_restrictions(self):

    restricted_a1 = self.ASSET1
    restricted_a2 = self.ASSET2
    unrestricted_a3 = self.ASSET3
    rl = StaticRestrictions([restricted_a1, restricted_a2])
    assert_not_restricted = partial(self.assert_not_restricted, rl)
    assert_is_restricted = partial(self.assert_is_restricted, rl)
    assert_all_restrictions = partial(self.assert_all_restrictions, rl)
    for dt in [str_to_ts(dt_str) for dt_str in ('2011-01-03', '2011-01-04', '2011-01-04    1:01', '2020-01-04')]:
        assert_is_restricted(restricted_a1, dt)
        assert_is_restricted(restricted_a2, dt)
        assert_not_restricted(unrestricted_a3, dt)
        assert_all_restrictions([True, True, False], dt)
