| 686 | | def tearDown(self): |
|---|
| 687 | | config.update({"server.webpath": ""}) |
|---|
| 688 | | startup.startTurboGears() |
|---|
| 689 | | |
|---|
| | 690 | def test_url_kwargs_overwrite_tgparams(self): |
|---|
| | 691 | """Keys in tgparams in call to url() overwrite kw args""" |
|---|
| | 692 | params = {'spamm': 'eggs'} |
|---|
| | 693 | assert 'spamm=ham' in url('/foo', params, spamm='ham') |
|---|
| | 694 | |
|---|
| | 695 | def test_url_doesnt_change_tgparams(self): |
|---|
| | 696 | """url() does not change the dict passed as second arg""" |
|---|
| | 697 | params = {'spamm': 'eggs'} |
|---|
| | 698 | assert 'foo' in url('/foo', params, spamm='ham') |
|---|
| | 699 | assert params['spamm'] == 'eggs' |
|---|
| 713 | | |
|---|
| 714 | | def test_url_kwargs_overwrite_tgparams(): |
|---|
| 715 | | """Check keys in tgparams in call to url overwrite kw args""" |
|---|
| 716 | | params = {'spamm': 'eggs'} |
|---|
| 717 | | assert 'spamm=ham' in url('/foo', params, spamm='ham') |
|---|
| 718 | | |
|---|
| 719 | | def test_url_doesnt_change_tgparams(): |
|---|
| 720 | | """Test that url() does not change the dict passed as second arg""" |
|---|
| 721 | | params = {'spamm': 'eggs'} |
|---|
| 722 | | assert 'foo' in url('/foo', params, spamm='ham') |
|---|
| 723 | | assert params['spamm'] == 'eggs' |
|---|