uselotus / lotus

File .deepsource.toml not found in the default branch of the repository root. Please refer to the docs.

Consider using identity comparison with singleton PTC-W0068
Bug risk
Major
a year agoa year old
Comparison to singleton True should be expr is True
 84        stripe_connector = PAYMENT_PROVIDER_MAP[PAYMENT_PROVIDERS.STRIPE]
 85        stripe_connector.initialize_settings(setup_dict["org"])
 86        # when self hosted make sure everything works
 87        assert SELF_HOSTED == True 88        assert stripe_connector.working()
 89        assert stripe_connector.organization_connected(setup_dict["org"])
 90
Comparison to singleton False should be expr is False
205            organization=setup_dict["org"],
206        )
207
208        assert stripe_sub.cancel_at_period_end == False209        stripe_connector.transfer_subscriptions(setup_dict["org"], end_now=False)
210
211        time.sleep(10)
Comparison to singleton True should be expr is True
210
211        time.sleep(10)
212        stripe_sub = stripe.Subscription.retrieve(stripe_sub.id)
213        assert stripe_sub.cancel_at_period_end == True214        assert (
215            Subscription.objects.filter(
216                organization=setup_dict["org"],
Comparison to singleton False should be expr is False
198        )
199        assert (
200            response[0]["metric_usage"] < response[0]["metric_total_limit"]
201        ) == False202
203    def test_get_access_free_bm_allow(self, get_access_test_common_setup):
204        setup_dict = get_access_test_common_setup(auth_method="api_key")
Comparison to singleton False should be expr is False
231        assert (
232            response[0]["event_name"] == setup_dict["allow_limit_metrics"][0].event_name
233        )
234        assert (response[0]["metric_usage"] < response[0]["metric_free_limit"]) == False235
236    def test_get_access_feature_allow(self, get_access_test_common_setup):
237        setup_dict = get_access_test_common_setup(auth_method="api_key")