def test_find_invalid_option():
    with pytest.raises(ValueError):
        Options.find('XXX')
Beispiel #2
0
 def get(self, request, *args, **kwargs):
     option_name = self.kwargs['option_name']
     option = Options.find(option_name=option_name)
     return Response(option.to_dict(), status=status.HTTP_200_OK)
def test_find_option(option_name):
    option = Options.find(option_name)
    assert option.name == option_name