class TestNoOpAuthenticator: def setup(self): self.instance = NoOpAuthenticator('test123') def test_authenticate(self): obj = NoOpAuthenticator.authenticate('test123') assert isinstance(obj, NoOpAuthenticator) is True assert obj.identifier == 'test123' def test_get_identifier(self): assert self.instance.get_identifier() == 'test123' def test_can_subscribe(self): assert self.instance.can_subscribe('anychannel') is True def test_can_unsubscribe(self): assert self.instance.can_unsubscribe('anychannel') is True def test_can_publish(self): assert self.instance.can_publish('anychannel') is True
def setup(self): self.instance = NoOpAuthenticator('test123')
def test_authenticate(self): obj = NoOpAuthenticator.authenticate('test123') assert isinstance(obj, NoOpAuthenticator) is True assert obj.identifier == 'test123'