def test_before_once(self):
        def before_fn(*a):
            test_functions.test_list.append(1)

        with before(
                'before_after.tests.test_functions.sample_fn',
                before_fn, once=True):
            test_functions.sample_fn(2)
            test_functions.sample_fn(3)

        self.assertEqual(test_functions.test_list, [1, 2, 3])