(self)
| 162 | assert fun(*args) == x |
| 163 | |
| 164 | def test_replace(self): |
| 165 | x = Signature('TASK', ('A',), {}) |
| 166 | assert x.replace(args=('B',)).args == ('B',) |
| 167 | assert x.replace(kwargs={'FOO': 'BAR'}).kwargs == { |
| 168 | 'FOO': 'BAR', |
| 169 | } |
| 170 | assert x.replace(options={'task_id': '123'}).options == { |
| 171 | 'task_id': '123', |
| 172 | } |
| 173 | |
| 174 | def test_set(self): |
| 175 | assert Signature('TASK', x=1).set(task_id='2').options == { |