deepsourcestatus / test-repository

Assert statement used outside of tests BAN-B101
Security
Major
8 months ago8 months old
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
28        self.signed_in = True
29
30    def check_signed_in(self):
31        assert self.signed_in == True, RuntimeError("You are not authorized!")32
33
34class AdminDashboard(BasePage, AdminMixin, SigninMixin, AdminMixin):
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
 40
 41    def get_number(self, min_max=[1, 10]):
 42        """Get a random number between min and max."""
 43        assert all([isinstance(i, int) for i in min_max]) 44        return random.randint(*min_max)
 45
 46