Project

General

Profile

« Previous | Next » 

Revision 7218849a

Added by koszko over 1 year ago

add a mapping/resources installation dialog

View differences:

test/unit/test_payload_create.py
118 118
    def assert_db_contents():
119 119
        db_contents = get_db_contents(execute_in_page)
120 120

  
121
        assert uuidv4_re.match(db_contents['resources'][0]['uuid'])
121
        assert uuidv4_re.match(db_contents['resource'][0]['uuid'])
122 122

  
123 123
        localid = f'local-{form_data["identifier"]}'
124 124
        long_name = form_data['long_name'] or form_data['identifier']
125 125
        payloads = dict([(pat, {'identifier': localid})
126 126
                         for pat in form_data['patterns'].split('\n') if pat])
127 127

  
128
        assert db_contents['resources'] == [{
128
        assert db_contents['resource'] == [{
129 129
      	    'source_name':      localid,
130 130
	    'source_copyright': [],
131 131
	    'type':             'resource',
132 132
	    'identifier':       localid,
133
	    'uuid':             db_contents['resources'][0]['uuid'],
133
	    'uuid':             db_contents['resource'][0]['uuid'],
134 134
	    'version':          [1],
135 135
	    'description':      form_data['description'],
136 136
	    'dependencies':     [],
......
141 141
            }]
142 142
        }]
143 143

  
144
        assert uuidv4_re.match(db_contents['mappings'][0]['uuid'])
145
        assert db_contents['mappings'] == [{
144
        assert uuidv4_re.match(db_contents['mapping'][0]['uuid'])
145
        assert db_contents['mapping'] == [{
146 146
      	    'source_name':      localid,
147 147
	    'source_copyright': [],
148 148
	    'type':             'mapping',
149 149
	    'identifier':       localid,
150
	    'uuid':             db_contents['mappings'][0]['uuid'],
150
	    'uuid':             db_contents['mapping'][0]['uuid'],
151 151
	    'version':          [1],
152 152
            'description':      form_data['description'],
153 153
            'long_name':        long_name,

Also available in: Unified diff