def test_max_age_can_be_different_dependeing_methods(self): foo = Service(name="foo", path="/foo", cors_max_age=42) foo.add_view("GET", _stub) foo.add_view("POST", _stub, cors_max_age=32) foo.add_view("PUT", _stub, cors_max_age=7) self.assertEqual(foo.cors_max_age_for("GET"), 42) self.assertEqual(foo.cors_max_age_for("POST"), 32) self.assertEqual(foo.cors_max_age_for("PUT"), 7)
def test_max_age_can_be_different_dependeing_methods(self): foo = Service(name='foo', path='/foo', cors_max_age=42) foo.add_view('GET', _stub) foo.add_view('POST', _stub, cors_max_age=32) foo.add_view('PUT', _stub, cors_max_age=7) self.assertEqual(foo.cors_max_age_for('GET'), 42) self.assertEqual(foo.cors_max_age_for('POST'), 32) self.assertEqual(foo.cors_max_age_for('PUT'), 7)
def test_max_age_can_be_defined(self): foo = Service(name="foo", path="/foo", cors_max_age=42) foo.add_view("POST", _stub) self.assertEqual(foo.cors_max_age_for(), 42)
def test_max_age_is_none_if_undefined(self): foo = Service(name="foo", path="/foo") foo.add_view("POST", _stub) self.assertIsNone(foo.cors_max_age_for("POST"))
def test_max_age_can_be_defined(self): foo = Service(name='foo', path='/foo', cors_max_age=42) foo.add_view('POST', _stub) self.assertEqual(foo.cors_max_age_for(), 42)
def test_max_age_is_none_if_undefined(self): foo = Service(name='foo', path='/foo') foo.add_view('POST', _stub) self.assertIsNone(foo.cors_max_age_for('POST'))
def test_max_age_can_be_defined(self): foo = Service(name='foo', path='/foo', cors_max_age=42) self.assertEqual(foo.cors_max_age_for(), 42)
def test_max_age_can_be_defined(self): foo = Service(name='foo', path='/foo', cors_max_age=42) self.assertEquals(foo.cors_max_age_for(), 42)
def test_max_age_can_be_defined(self): foo = Service(name="foo", path="/foo", cors_max_age=42) self.assertEqual(foo.cors_max_age_for(), 42)