<s> from __future__ import unicode_literals <EOL> from django . test import TestCase <EOL> from django . core . urlresolvers import reverse <EOL> from django . test . client import RequestFactory <EOL> from happenings . utils . common import get_net <EOL> class GetNetTest ( TestCase ) : <EOL> def setUp ( self ) : <EOL> self . factory = RequestFactory ( ) <EOL> self . url = reverse ( '<STR_LIT>' ) <EOL> def test_valid_next ( self ) : <EOL> url = self . url + '<STR_LIT>' <EOL> req = self . factory . get ( url ) <EOL> net = get_net ( req ) <EOL> self . assertEqual ( net , <NUM_LIT:1> ) <EOL> def test_valid_prev ( self ) : <EOL> url = self . url + '<STR_LIT>' <EOL> req = self . factory . get ( url ) <EOL> net = get_net ( req ) <EOL> self . assertEqual ( net , - <NUM_LIT:1> ) <EOL> def test_invalid ( self ) : <EOL> url = self . url + '<STR_LIT>' <EOL> req = self . factory . get ( url ) <EOL> net = get_net ( req ) <EOL> self . assertEqual ( net , <NUM_LIT:0> ) <EOL> def test_valid_next_and_prev ( self ) : <EOL> url = self . url + '<STR_LIT>' <EOL> req = self . factory . get ( url ) <EOL> net = get_net ( req ) <EOL> self . assertEqual ( net , - <NUM_LIT:1> ) </s>
